News for hackers. Stuff that matters.
Re:T * sin (t) ≈ Christmas tree by adamnemecek on Friday December 27, 2013 @01:34PM (#6971912)
Someone also reimplemented it in Mathematica

http://community.wolfram.com/groups/-/m/t/175891

Re:T * sin (t) ≈ Christmas tree by zafka on Friday December 27, 2013 @01:55PM (#6972022)
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.
Re:T * sin (t) ≈ Christmas tree by jwmerrill on Friday December 27, 2013 @02:43PM (#6972242)
Quick 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 by sheetjs on Friday December 27, 2013 @01:43PM (#6971954)
Re:T * sin (t) ≈ Christmas tree by CodeWithCoffee on Friday December 27, 2013 @01:58PM (#6972037)
It seems awfully appropriate 'starring' this repository.
Re:T * sin (t) ≈ Christmas tree by swamp40 on Friday December 27, 2013 @01:27PM (#6971865)
I really like the simplicity.

Can you reverse the direction of one of the spirals?

Or maybe slow down one to half-speed?

(Maybe it would look better, maybe not.)

Re:T * sin (t) ≈ Christmas tree by popotamonga on Friday December 27, 2013 @01:04PM (#6971744)
Same formula on Quake's Railgun
Re:T * sin (t) ≈ Christmas tree by icefox on Friday December 27, 2013 @02:23PM (#6972155)
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 by angersock on Friday December 27, 2013 @03:20PM (#6972435)
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 by callmevlad on Friday December 27, 2013 @06:21PM (#6973083)
Extra 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.
Re:T * sin (t) ≈ Christmas tree by elwell on Friday December 27, 2013 @06:30PM (#6973117)
Still canvas, but is that any smoother?: http://jsfiddle.net/rYa5d/8/
Re:T * sin (t) ≈ Christmas tree by karanbhangui on Friday December 27, 2013 @06:54PM (#6973199)
Nice touch with the subtle parallax!
Re:T * sin (t) ≈ Christmas tree by britta on Friday December 27, 2013 @09:45PM (#6973635)
Several years ago I made a very silly simple Christmas tree in HTML/CSS, with <blink>ing lights and Unicode ornaments, and my friend made a way to place your own choice of "ornaments": http://unicodexmas.com/

Not as stylish, but in the spirit!

Re:T * sin (t) ≈ Christmas tree by elwell on Friday December 27, 2013 @04:00PM (#6972593)
with dynamic alpha, and mouse orient around x-axis: http://jsfiddle.net/rYa5d/1/
Re:T * sin (t) ≈ Christmas tree by elwell on Friday December 27, 2013 @06:31PM (#6973120)
Actually it's a little better when more spaced out: http://jsfiddle.net/rYa5d/8/
Re:T * sin (t) ≈ Christmas tree by c3d on Sunday December 29, 2013 @01:33PM (#6980612)
Yet another entry. The Christmas tree in Tao Presentations is less than 30 lines of code, with a star at the top and blinking lights. Code here: http://www.taodyne.com/shop/dev/en/blog/275-a-christmas-tree....
Re:T * sin (t) ≈ Christmas tree by prafulrana on Friday December 27, 2013 @08:26PM (#6973452)
Re:T * sin (t) ≈ Christmas tree by coherentpony on Friday December 27, 2013 @01:17PM (#6971806)
Yeah it's a helix.
Re:T * sin (t) ≈ Christmas tree by gky2 on Saturday December 28, 2013 @05:12PM (#6976875)
Oh god staring at this just motivates me to work. Thanks a lot for sharing, as well as all the commenters showing the different implementations of it.
Re:T * sin (t) ≈ Christmas tree by kevining on Friday December 27, 2013 @03:06PM (#6972361)
Link to github.io page for the lazy: http://anvaka.github.io/atree/
Re:T * sin (t) ≈ Christmas tree by GeorgeKangas on Friday December 27, 2013 @10:38PM (#6973790)
May I suggest t * sin( k * ln(t) ), for some constant k? That makes the path self similar about the (0, 0) point. Maybe you'd like that.
Re:T * sin (t) ≈ Christmas tree by chippy on Friday December 27, 2013 @01:34PM (#6971913)
Very merry cleverness
Re:T * sin (t) ≈ Christmas tree by coverband on Friday December 27, 2013 @04:18PM (#6972659)
Very nice and not complicated at all -- good work!
Re:T * sin (t) ≈ Christmas tree by marcosscriven on Friday December 27, 2013 @01:33PM (#6971906)
Really like that - beautiful and elegant.
Re:T * sin (t) ≈ Christmas tree by mamadou on Friday December 27, 2013 @05:38PM (#6972931)
Thanks for sharing!
Re:T * sin (t) ≈ Christmas tree by thejacenxpress on Friday December 27, 2013 @01:29PM (#6971879)
Nice job