This is an old revision of the document!


Made by: Zoey

Simple Example

Code

osc(25,-0.1,0.5).kaleid(50).out()

Explain

osc(25,-0.1,0.5)
osc(frequency: like how many line in one round, speed, color)

.kaleid(50)
- The number inside the parentheses is mean how many corners for the shape ,so if i set corners to 3 it will return triangle

.out()
- out is mean tell the Hydra to return the function and show the photo.

Complex Example

Code

osc(25,-0.1)
.kaleid(5)
.color(3,0.91,0.39)
.rotate(0.9, 0.1)
.modulate(o0, () => mouse.x * 0.0003)
.out()

Explain

osc(25,-0.1)
.kaleid(5)
- over here I set the kaleid to five, so you can see the shape is pentagon.

.color(3,0.91,0.39)
- This color function is hard for me. Because the color function over here is different from SVG.js and p5.js So i am still find the answer

.rotate(0.9, 0.1)
- I am still finding what is the first number mean, but the second number is mean how fast the rotate should be.

.modulate(o0, () => mouse.x * 0.0003)
- In this function it is work when you move your mouse. The first number is texture, In hydra there have 4 different texture, ex.o0,o1,o2,o3

.out()
  • zoey-lin-hydra-presentations.1672242325.txt.gz
  • Last modified: 2022/12/28 07:45
  • by zoey.lin