|
|
Here's a diagram to better visualize the relationships.
Drawn in Visio 2007
7 hexagons, rotated -40.9801 deg.
Left line resulting angle was 19.0199 deg.
Oh, also:
http://logo.twentygototen.org/mJjiNzK0
has
"make "ln :ln / 2.6457" as part of the construct. I'm not sure if that has
anything to do with your magic number for L.
Post a reply to this message
Attachments:
Download 'gosper.png' (45 KB)
Preview of image 'gosper.png'
|
|
|
|
"Bald Eagle" <cre### [at] netscapenet> wrote:
> Apologies again about the hastily and erroneously drawn sketch.
>
> Here's an update for anyone playing along at home. :)
And my update...
Thanks to Scott and Bald Eagle for their help un-derping my math.
Regards,
A.D.B.
#version 3.7;
global_settings { assumed_gamma 1.8 }
#include "colors.inc"
#include "math.inc"
#declare ft =12.0 ;
light_source { <0.0, 0.0, -1.0*ft> rgb 1 }
camera {
perspective
location <0.0, 0.0, -10.0>
up y
right x*(image_width/image_height)
look_at <0.0, 0.0, 0.0>
}
#default {
pigment { Orange }
finish { ambient 0 diffuse 0.7 }
}
#macro vec2rot(V, A)
#local _X_ = V.u*cos(A) - V.v*sin(A);
#local _Y_ = V.u*sin(A) + V.y*cos(A);
#local RESULT = <_X_,_Y_>;
RESULT
#end
#macro gosper_axiom(p0, p1)
#local V = p1 - p0;
#local len = vlength(V);
#if( len > 0.01 )
#local THETA = asin(sqrt(3)/(2*sqrt(7)));
#local vT = vnormalize(V);
#local newlen = len/sqrt(7);
#local newvec = vec2rot( vT,THETA);
#local np1 = p0 + newlen*vec2rot( vT,THETA);
#local np2 = p1 - newlen*vec2rot( vT,THETA);
gosper_axiom(p0,np1)
gosper_axiom(np1,np2)
gosper_axiom(np2,p1)
#else
cylinder { p0, p1 0.0078125 }
#end
#end
#macro GosperIsland(R)
#for(A,0,300,60)
cylinder { R*<cosd(A), sind(A)> R*<cosd(A+60), sind(A+60)> 0.0078125
pigment { Red } finish { ambient 0 diffuse 0.7 } }
gosper_axiom( R*<cosd(A), sind(A)>, R*<cosd(A+60), sind(A+60)>)
#end
#end
#for(A,0,300,60)
union { GosperIsland(1.0) rotate (A)*z translate 2*sind(60)*<sind(A),
cosd(A), 0.0> }
#end
Post a reply to this message
Attachments:
Download 'vectorlab.png' (42 KB)
Preview of image 'vectorlab.png'
|
|