Live data from Hacker News

Recursive Drawing

recursivedrawing.com

51–60 of 86 posts

Re: Recursive Drawing

#51

Textual instructions (if you don't want to watch the demo video): The left column is the shapes library. The center area is the canvas/workspace. The right area is an outline view of the shapes in the canvas. To add a shape to the canvas, drag your mouse from the shape in the shape library to the workspace. To move a shape, drag inside it, when the whole shape is highlighted red. To resize and rotate a shape, drag th…

Here's my Sierpinski triangle : http://i.imgur.com/tMbrj.png

Re: Recursive Drawing

#53
post #47

Earlier quoted context omitted.

Then you don't get the nice page sliding animation when swiping to go forward/back in Safari.

"nice page sliding animation" vs "[losing] all of your data" does not sound like a difficult decision to me.

Contrary to Chrome which pops the history stack instantly, Safari's "nice page sliding animation" is completely reversable if you don't release the gesture and "put things back in place". The animation is not a gimmick, it has a very real usability purpose.

Re: Recursive Drawing

#54
This is so cool!

I started drawing without watching the video and didn't get it. Thank goodness I didn't give up there.

Recipe for fun:

Make a very thin rectangle by dragging in a square, and holding down shift to resize it. You can basically get a line.

Drag the line onto itself. You now have a spirograph.

I would think these are actually not that big or complicated to store. Each drawing is a list of {pointer, x, y, theta} for each. You might be able to "export to text" pretty easily. Want to see a friend's drawing (and incidentally, entire drawing toolbox)? Import the text.

Edit: came back to add that I left morphing (size, length/width ratios) out of the data structure. Incidentally, maybe morphing is why triangle isn't a primitive. What relation should you set up for a self referencing triangle? Maybe if you label the vertices.

You might be able to handle the self-referencing without any extra members in the text representation. You just have to handle a special case of child pointer == self.

I didn't read the code yet, but it's fun to think about.

Re: Recursive Drawing

#57

Can't seem to figure out how to draw Sierpinski's triangle. The hello world of fractals.

Draw a triangle and put 4 shrunk copies of itself in the triangle (center one flipped)? http://imgur.com/m0Okt see components on rhs. Edit: Oh sorry, was confused about which one Sierpinski's was. Can fix it by omitting middle triangle: http://imgur.com/MVmPh

Or you can do the inverse http://i.imgur.com/tMbrj.png

Re: Recursive Drawing

#59

Textual instructions (if you don't want to watch the demo video): The left column is the shapes library. The center area is the canvas/workspace. The right area is an outline view of the shapes in the canvas. To add a shape to the canvas, drag your mouse from the shape in the shape library to the workspace. To move a shape, drag inside it, when the whole shape is highlighted red. To resize and rotate a shape, drag th…

After trying my hand on some Sierpinski carpet and pseudo-dragon curve, I was experimenting with some texture stuff, my hand slipped, and now I don't have the foggiest idea how I did this[0] (it took ~10 minutes to completely render)

I found the demo trees a bit lacking, so I made some with more recursiveness and better fitting near the joints[1]. Fibonacci rarely looked so cool[2].

Second order recursion can give you some interesting stuff[4]. At some point I was successful in drawing a galaxy but things went whacky

I could see myself readily using this to generate artwork or material texture in some game.

This thing desperately needs some more love[3] than shown in the video. I'm dying to export data, be able to remove elements from left and right sidebars, have more basic shapes (triangle?), a persistent shape library (html5 local storage?), and some form of snapping to grid/angles/ratio/edge.

[0] http://imgur.com/a/EneFC#0 [1] http://imgur.com/a/EneFC#1 [2] http://imgur.com/a/EneFC#2 [3] http://imgur.com/a/EneFC#3 [4] http://imgur.com/a/ZUlOZ#1

Post reply on HN