|
|
>>OK, I was about to post a question... but then I realised, I'm not sure
>>if the shape I'm looking for is a parabola or a hyperbola...
>>
>>Anyway, I was going to ask how I get POV-Ray to draw that shape. (The
>>one with two lobes that don't quite meet.) I thought it was in
>>shapes.inc somewhere, but I can't seem to find it...
>
>
> Hi,
> it's a hyperboloid
Ah, ok.
> the equation which describes it is:
>
> where a,b,c determine the length/scaling of the axes.
> the axis with the plus-sign is at the same time the rotational axis
Excellent.
> in SDL you can make this with a quadric:
> #declare a=1;
> #declare b=2;
> #declare c=1;
>
> quadric {
> <-1/(a*a), 1/(b*b), -1/(c*c)>, // A x^2 + B y^2 + C z^2 +
> <0, 0, 0>, // D xy + E xz + F yz +
> <0, 0, 0>, // G x + H y + I z +
> -1 // J
> texture {
> pigment { color rgb 1 }
> finish { diffuse 1 ambient 0 phong 0.5 }
> }
> }
>
> In this example the shape is symmetric about the y-axis
> and scaled by a factor of two.
I wanna use this to make the bottom of a glass. (That is, the glass is a
cylinder, hollowed out with a hyperboliod.) Does the quadric primitive
give an infinite shape? How would I position the "tip" of the shape at a
particular point in space? (Say... where I want the inside of my glass
to stop! ;-) )
Thanks for the info.
Andrew @ home.
Post a reply to this message
|
|