r/processing • • Jan 09 '20

supportive architecture

198 Upvotes

11 comments sorted by

15

u/Iampepeu Jan 09 '20

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

6

u/coffee869 Jan 10 '20

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

3

u/mtZc Jan 10 '20

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

1

u/panTERA_sMELOS Jan 10 '20

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.

2

u/mtZc Jan 10 '20 edited Jan 10 '20

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!

1

u/mtZc Jan 10 '20

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

6

u/[deleted] Jan 10 '20

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?

2

u/mtZc Jan 10 '20

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.

1

u/[deleted] Jan 11 '20

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

0

u/[deleted] Jan 10 '20

[deleted]

1

u/mtZc Jan 10 '20

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