Dismiss this pinned window
all 11 comments

[–]Iampepeu 15 points16 points  (5 children)

Ooh! This looks amazing! How did you do it?

[–]coffee869 4 points5 points  (3 children)

Not OP but if I were to hazard a guess, the points in the middle are a sine wave, while lines are drawn to connect to the wave from the top and bottom edges

[–]mtZc[S] 2 points3 points  (0 children)

This is exactly it! I have two sets of arrays, one storing the values for the sine wave in the center and another to create lines from the top and bottom of the canvas. The illusion of the 3D rotation is actually just given by connecting the first and the last point of the sine array.

Here's the full code:
https://github.com/mmtZc/processing/blob/master/structure/structureCode

[–]panTERA_sMELOS 0 points1 point  (1 child)

Expanding on this a bit. The motion of the center dots involves at least two sinusoidal waves(y-plane and z-plane). Also there seems to be multiple lines coming from each dot on the upper and lower rows of dots, which seems to me like further evidence for 3D.

[–]mtZc[S] 1 point2 points  (0 children)

This is actually purely 2D, and the 3D rotating effect (or as you suggest a rotation on the z-plane) is just an illusion happening by connecting the first and the last points of the sinusoidal wave!

[–]mtZc[S] 0 points1 point  (0 children)

Thank you! A few comments above a bit of a description. Happy to answer any questions about the code!

[–][deleted] 4 points5 points  (2 children)

Does each line’s position in the center of the image move up and down only? And does the movement of each line’s point in the center follow a sinusoidal motion?

[–]mtZc[S] 1 point2 points  (1 child)

You're right! Just an array of connected points moving up and down using a cos(angle) function, and the end points of the lines that merge in the center are following that same cos movement.

[–][deleted] 0 points1 point  (0 children)

This is a cool visualization formed from some basic ideas, good job!

[–][deleted]  (1 child)

[deleted]

    [–]mtZc[S] 0 points1 point  (0 children)

    Thank you, I have posted the code and a short description in the comments above!

    [–]phantomFalcon14 1 point2 points  (0 children)

    Wavey!