Nutcracker: new eff...
 
Notifications
Clear all

Nutcracker: new effect, butterfly wing

35 Posts
13 Users
0 Reactions
16.2 K Views
smeighan
Posts: 2595
Topic starter
(@smeighan)
Famed Member
Joined: 15 years ago
[#19108]

I came across this equation that simulates the color on a butterfly wing.
http://mathworld.wolfram.com/ButterflyFunction.html

So , you now have a new effect.

The RADIAN_SHIFT parameter is how much. for each frame. the colors are shifted. I found values between .05 and .1 are good. The higher the number the faster the shift across the tree.

username f
user_target ZZ_ZZ
effect_class butterfly
effect_name FLY1
window_degrees 180
start_color #FFFFFF
end_color #FFFFFF
frame_delay 50
sparkles
seq_duration 5
radian_shift .05
submit Submit Form to create your effect

If you increase the radian shift, you get faster color movement

_POST
username f
user_target ZZ_ZZ
effect_class butterfly
effect_name BUTTERFLY2
window_degrees 180
frame_delay 50
sparkles
seq_duration 5
radian_shift .3
submit Submit Form to create your effect

And if your show has heavy metal, try a radian shift of 1.0


34 Replies
kychristmas
Posts: 3955
(@kychristmas)
Famed Member
Joined: 18 years ago

Dude you are killing me. The Engine you have created is awesome. Absolutely Amazing. Is the Rectangular Grid available yet?

I can me my Mendlebrot Mega Trtee now.


Reply
smeighan
Posts: 2595
Topic starter
(@smeighan)
Famed Member
Joined: 15 years ago
kychristmas wrote:Dude you are killing me. The Engine you have created is awesome. Absolutely Amazing. Is the Rectangular Grid available yet?

I can me my Mendlebrot Mega Trtee now.

I will get the rect grid done by this next weekend.

BTW, any math formula that can be driven by X (Strand#) and Y (Pixel#) can now be processed.

Here is the total code for the butterfly effect


//
// draws colors similar to a Butterfly Wing
//
// Parameters:
// $x .. Strand number (1 .. $maxStrand). Strand 1 is closest facing street or whatever direction tree is pointed.
// $y .. Pixel number (1 .. $maxPixel). Pixel number 1 in Nutcracker normal terms is always the top of the rgb device
// $maxX .. Max strand seen in rgb device
// $maxY .. Max Pixel seend in RGB device
// $offset .. Amount to add to the $radian to cause a color shift. Values like .05 to .1 seem best for each frame
//
function butterfly($x,$y,$maxX,$maxY,$offset)
{
// 2pi = value * 2pi/80

$pi2 = 2*pi();
$a = $pi2 / ($maxX+$maxY);
$rad=$offset + (($x+$y)*$a);
$n = ($x*$x - $y*$y) * sin ($rad);
$d = ($x*$x+$y*$y);

if($d>0)
$v=$n/$d;
else
$v=0;
return $v;
}


Reply
Posts: 848
(@tfischer)
Prominent Member
Joined: 17 years ago

Totally agree - this stuff is awesome. I can't wait until my pixels come in so I can see some of this for real.

Very, very nice work.


Reply
jaywalk101
Posts: 761
(@jaywalk101)
Prominent Member
Joined: 15 years ago

i just tried out the butterfly effect!!! once again, this is simply amazing!!!!!!!!!!!!!!!!!!


Reply
Page 1 / 7
Share: