![]() |
|
Displaying a 2D net of a 3D cube |
Scooter
Member #16,799
January 2018
|
Hi all: |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
This can be accomplished using trig, or transformations. You need the path of each square of the cube and each corner of each square while folding it into the cube. Hint - the net already has a z-value of 0. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Scooter
Member #16,799
January 2018
|
Thanks Edgar! |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Scooter said: Trying to unfold and fold with the cube rotating seems impossible. You'll want to multiply transforms. Multiply the rotation transform with your folding transform. Remember, you don't have a cube, you have six 3D squares, each with their own folding (rotation, translation, etc...). 3D trig can be really hard. Use a series of 2D transformations around an axis to keep it simpler. The result will be the same. Also, keep it simple. Try to fold a single square to begin with. Make it rotate around one of its edges. That is essentially what folding is. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|