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" // (< 5.0) Particle
Vers=500
Have fun!