|
|
"Shay" <n@n.n> schreef in bericht news:4c13b889$1@news.povray.org...
> Possible with an isosurface function?
Shay,
Years ago I needed a formula for the same shape you now request and, beleive
me, it took me several month to figure it out.
You start with:
x = (A + a.cos(alpha)).cos(phy)
y = b.sin(alpha)
z = (B + a.cos(alpha)).sin(phy)
A and B are the different main radii in x and z direction,
and a and b are the different radii in de pipe of the torus.
So the major radius R is now changed in A and B
and the minor radius r is now changed in a and b.
When you rotate alpha and phy over 360 degrees, you get the torus you want.
If you want to translate this to the f(x,y,z) = .... you need much patience
and time and
at the end (couple of days at least) you get your variables you can put in
the
poly shape.
In this range t = a/b so this is the ratio of the minor radii.
If you want a circular pipe, then t = 1.
Constant:
powers:
+t^4
x^4y^4
+2t^2(B^2-a^2)
x^4y^2
+(B^2-a^2) ^2
x^4
+2t^6
x^2y^6
+2t^4
x^2y^4z^2
-2t^4{(A^2+B^2)-3(B^2-a^2)} x^2y^4
-2t^2{(A^2-a^2)+(B^2-a^2)-4(AB-a^2)} x^2y^2z^2
+2t^2{(B^2-a^2)^2-2(B^2-a^2)(A^2+a^2)} x^2y^2
+2{(A^2-a^2)(B^2-a^2)+2(A-B)^2a^2 x^2z^2
-2(B^2-a^2)^2(A^2+a^2)
x^2
+t^8
y^8
+2t^6
y^6z^2
+2t^6{(A^2-a^2)+(B^2-a^2)} y^6
+t^4
y^4z^4
-2t^4{(A^2+B^2)-3(A^2-a^2)} y^4z^2
+t^4{(A^2-a^2)^2+(B^2-a^2)^2+4(A^2-a^2)(B^2-a^2)} y^4
+2t^2(A^2-a^2)
y^2z^4
+2t^2{(A^2-a^2)^2+2(A^2-a^2)(B^2+a^2)} y^2z^2
+2t^2{(A^2-a^2)^2(B^2-a^2)+(A^2-a^2)(B^2-a^2)^2} y^2
+(A^2-a^2) ^2
z^4
-2(A^2-a^2)^2(B^2+a^2)
z^2
(B^2-a^2)^2(A^2-a^2)^2
constant
This equation works fine if the poly shape power 8 is possible, but for some
reason today this is limited to power 7. There was a short period of time
that power 15 was alowed, but alas, not in this times. For me it would be
fine if this limitation is raised again.
In the short period that power 8 was alowed, it traces fine and not too
slow. The slowing down happened with textures. Then it slowed down
considerable. But I think that with our modern fast computers this is no
problem anymore.
You can still use this with the parametric Object, but then the shape is
made out of triangles and is not the pure mathematic form.
Maybe this mail causes that the max power is raised to 8 so this shape can
be used in his pure mathematical form again.
Jaap Frank
Post a reply to this message
|
|