It's actually pretty simple. The code for the design is
for (i=0;i<=steps;i++){ Item.moveTo(aX+(cX-aX)*i/steps,aY+(cY-aY)*i/steps) Item.lineTo(bX+(dX-bX)*i/steps,bY+(dY-bY)*i/steps) } for (i=0;i<=steps;i++){ Item.moveTo(aX+(bX-aX)*i/steps,aY+(bY-aY)*i/steps) Item.lineTo(cX+(dX-cX)*i/steps,cY+(dY-cY)*i/steps) }
All the rest of the code is just for making it interactive.
interesting how so little coding can produce such a cool effect. although the parts in the middle about the control nodes still looks quite complex... you must be a genius to come up with that XD
It's pretty?
Definitely going to the favourites!
The code for the design is
for (i=0;i<=steps;i++){
Item.moveTo(aX+(cX-aX)*i/steps,aY+(cY-aY)*i/steps)
Item.lineTo(bX+(dX-bX)*i/steps,bY+(dY-bY)*i/steps)
}
for (i=0;i<=steps;i++){
Item.moveTo(aX+(bX-aX)*i/steps,aY+(bY-aY)*i/steps)
Item.lineTo(cX+(dX-cX)*i/steps,cY+(dY-cY)*i/steps)
}
All the rest of the code is just for making it interactive.
although the parts in the middle about the control nodes still looks quite complex... you must be a genius to come up with that XD