|
|
Yeah, supercone...
///////////// begin
#macro SuperCone(end1,a,b,end2,c,d)
intersection
{ quartic
{ <0, 0, 0, 0, 0, 0, 0, b*b-2*b*d+d*d, 2*(b*d-b*b), b*b,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, a*a-2*a*c+c*c, 2*(a*c-a*a), a*a, 0, 0, 0, 0,
-(a*a-2*a*c+c*c)*(b*b-2*b*d+d*d),
-(2*((b*d-b*b)*(a*a-2*a*c+c*c)+(a*c-a*a)*(b*b-2*b*d+d*d))),
-(b*b*(a*a-2*a*c+c*c)+4*(a*c-a*a)*(b*d-b*b)+a*a*(b*b-2*b*d+d*d)),
-(2*(b*b*(a*c-a*a)+a*a*(b*d-b*b))), -a*a*b*b>
sturm
}
cylinder { 0, z, max(max(a,b),max(c,d)) }
bounded_by { cone { 0, max(a,b), z, max(c,d) } }
#local Dirv=end2-end1;
scale <1,1,vlength(Dirv)>
#local VX1=z;
#local VX2=vnormalize(Dirv);
#local VY=vcross(VX2,VX1);
#if(vlength(VY)>0)
#local VY=vnormalize(VY);
#local VZ1=vcross(VY,VX1);
#local VZ2=vcross(VY,VX2);
matrix < VX1.x, VY.x, VZ1.x,
VX1.y, VY.y, VZ1.y,
VX1.z, VY.z, VZ1.z,
0 0 0 >
matrix < VX2.x, VX2.y, VX2.z,
VY.x, VY.y, VY.z,
VZ2.x, VZ2.y, VZ2.z,
0, 0, 0 >
#end
translate end1
}
#end
camera { location <6,5,-10> look_at 0 angle 35 }
light_source { <100,100,-20>,1 }
plane { y,-1.5 pigment { checker rgb 1, rgb .5 } }
object
{ SuperCone(<0,-1.5,0>,1,2, <0,1.5,0>,1,.5)
pigment { rgb y } finish { specular .5 }
}
//////////////// end
Alex Vandiver <van### [at] tiacnet> wrote in message
news:3821025E.E830585B@tiac.net...
> I seem to remember, _somewhere_ recently, a poly (quadric?) that would
> smoothly connect two ellipsoids; this can't be done with a simple cone.
> Does this ring any bells with anyone, or am I being delusional..again?
> I can't find anything like it on the 'net, nor in any macro packages..
> Thanks,
> -Alex Vandiver
>
Post a reply to this message
|
|