a mental exercise...

Discussion forum for G-Force users

Moderators: BTT, andy55, b.dwall, juxtiphi

Post Reply
jerohm
Senior Member
Posts: 419
Joined: Fri Jan 09, 2009 5:19 pm

a mental exercise...

Post by jerohm »

:idea: "Give a Man a Fish, ... blah blah blah" :idea:

Recently, while browsing the internet, I found a site where the author calculated the face coordinates of a Dodecahedron. It was obvious that building off his efforts, I could have greatly simplified MY version of "Dodecahedron.txt", but the truth is, I learned MUCH MORE working out all the geometry on my own. It is still interesting. I created a very simple Particle template plotting Paul Bourke's efforts...

Code: Select all

// Port of Dodecahedron (Particle):
//   paulbourke.net/geometry/platonic/
//  - jrm

Offs=0  // Debug

Lwdt="1.2"
// Pen="127/128"

Aspc=1
ConB=1          // Let G-Force draw the lines (connect ALL the points)

A0="choice({ 0, 1})"            // Turn or Tumble

/****/

Num=12
Stps="6"

PHI=1.618       // PHI is the golden ratio = (1 + sqrt(5)) / 2
A=0
B=.618          //  (1 / PHI)
C=.382          //  (2 - PHI)

A1="transpose( { { C,  0,  1}, {-C,  0,  1}, {-B,  B,  B}, { 0,  1,  C}, { B,  B,  B}
               , {-C,  0,  1}, { C,  0,  1}, { B, -B,  B}, { 0, -1,  C}, {-B, -B,  B}
               , { C,  0, -1}, {-C,  0, -1}, {-B, -B, -B}, { 0, -1, -C}, { B, -B, -B}
               , {-C,  0, -1}, { C,  0, -1}, { B,  B, -B}, { 0,  1, -C}, {-B,  B, -B}
               , { 0,  1, -C}, { 0,  1,  C}, { B,  B,  B}, { 1,  C,  0}, { B,  B, -B}
               , { 0,  1,  C}, { 0,  1, -C}, {-B,  B, -B}, {-1,  C,  0}, {-B,  B,  B}
               , { 0, -1, -C}, { 0, -1,  C}, {-B, -B,  B}, {-1, -C,  0}, {-B, -B, -B}
               , { 0, -1,  C}, { 0, -1, -C}, { B, -B, -B}, { 1, -C,  0}, { B, -B,  B}
               , { 1,  C,  0}, { 1, -C,  0}, { B, -B,  B}, { C,  0,  1}, { B,  B,  B}
               , { 1, -C,  0}, { 1,  C,  0}, { B,  B, -B}, { C,  0, -1}, { B, -B, -B}
               , {-1,  C,  0}, {-1, -C,  0}, {-B, -B, -B}, {-C,  0, -1}, {-B,  B, -B}
               , {-1, -C,  0}, {-1,  C,  0}, {-B,  B,  B}, {-C,  0,  1}, {-B, -B,  B}
               } ) / 2"

B0="t/8"
B1="A0 * B0 + Pi/16"            // Turn or Tumble

A2="1.5 + rnd( .5 )"            //[Randomize] Size scale

B2="Id*(Num_S_Steps-1)"
B3="A2 * { subrange( A1, B2, 0, B2+(Num_S_Steps-2), 2 )
         , col(A1, B2)
         }"

B4="B3 * cos( B0 )"
B5="B3 * sin( B0 )"

// X'= (X  * cos(t0) - Y * sin(t0))
// Y'= (X  * sin(t0) + Y * cos(t0))
// Y"= (Y' * sin(t1) + Z * cos(t1))
//   OR
// Y"= (X * sin(t0) + Y * cos(t0)) * sin(t1) + Z * cos(t1)

X=0     // Yes, this is valid, but I really only did it for you guys
Y=1
Z=2

B6="              row(B4,X)   - row(B5,Y)"              // X'
B7="sin( B1 ) * ( row(B5,X)
                + row(B4,Y) ) + row(B3,Z) * cos(B1)"    // Y"
X0="B6"
Y0="B7"

Meta="reactive=0 detail=3 density=3"                 // &#40;< 5.0&#41; Particle
Vers=500

Now if you are serious (and ambitious), you can work through and MODIFY this example, with Paul's Icosahedron data. The actual modification is trival, but does require more effort than simply editting PEN or LWDT. You need to understand the parameters of the task at hand, and understand why I wrote the template as I did. Do not gloss over the details, or you won't learn a damn thing (By the time you can fully explain the structure/syntax/implications of 'B3', you can pat yourself on the back)! When you successfully complete this exercise, you will have a new Icosahedron particle, and be equipt to tackle a little more challenging endeavors of your own volition.
Have fun!
8)

User avatar
BTT
Administrator
Posts: 2162
Joined: Sun Jun 20, 2010 9:34 pm
Location: United Kingdom

Post by BTT »

Hello jerohm

Good Particle, thanks for sharing.
Now if you are serious (and ambitious), you can work through and MODIFY this example, with Paul's Icosahedron data.
Think I will stick to ColorMaps though.
.
Regards BTT

ColorMap Creator for G-Force and Aeon --- SoundSpectrum Forum Administrator.

jerohm
Senior Member
Posts: 419
Joined: Fri Jan 09, 2009 5:19 pm

Post by jerohm »

well that doesn't make me happy...

You kinda get a pass because you ALREADY contribute significant value with your ColourMaps...
(... but it would be nice if you learned how to spell the word 'color' correctly :wink: )

I still have faith that somebody is going to provide the forum with a new "Icosahedron" particle.
(don't disappoint me)

:D

Post Reply