This reminds me of when I first started programming in Turbo Pascal. I made a Christmas tree using graphic mode and trig functions. I also only used if-then statements so i ended up with about a thousand lines :)
Looking at this more elegant tree reminds me of why I went into this career.
T * sin (t) ≈ Christmas tree
11–20 of 28 posts
Re: T * sin (t) ≈ Christmas tree
#12It seems awfully appropriate 'starring' this repository.
Re: T * sin (t) ≈ Christmas tree
#13Same formula on Quake's Railgun
Got a link? Google found this Quake2 railgun, but it doesn't look to be the same on first glance https://github.com/id-Software/Quake-2/blob/master/ctf/g_wea...
Re: T * sin (t) ≈ Christmas tree
#14Quick reimplementation in the desmos graphing calculator: https://www.desmos.com/calculator/brjshfkaof
Press play next to t_0 to animate.
Re: T * sin (t) ≈ Christmas tree
#15Link to github.io page for the lazy: http://anvaka.github.io/atree/
Re: T * sin (t) ≈ Christmas tree
#16Same formula on Quake's Railgun
Got a link? Google found this Quake2 railgun, but it doesn't look to be the same on first glance https://github.com/id-Software/Quake-2/blob/master/ctf/g_wea...
That's the game attack logic, not the rendering logic. You want this instead:
https://github.com/id-Software/Quake-2/blob/master/client/cl...
Re: T * sin (t) ≈ Christmas tree
#17with dynamic alpha, and mouse orient around x-axis: http://jsfiddle.net/rYa5d/1/
Re: T * sin (t) ≈ Christmas tree
#18Very nice and not complicated at all -- good work!
Re: T * sin (t) ≈ Christmas tree
#19Thanks for sharing!
Re: T * sin (t) ≈ Christmas tree
#20Extra credit to anyone who can implement this in HTML/CSS without using the canvas element. Since CSS transformations are hardware accelerated, I bet it can be made to look as smooth as the reference GIF.