 |
 |
|
 |
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I have made the "fence" in the image below
from two different shapes, both made with
a torus.
But there seems to be a problem with the
light reflections from the texture,
(which is common to the two shapes;
Soft_Silver with a Red pigment):
The reflection normal of the surfaces
appears to make a sudden change of
direction in the region where the two
shapes meet.
(There is only one light source.)
Is this correct behaviour?
(I'm using standard POV-Ray v3.1g for
Windows.)
And also: Does anyone know of any other
basic shapes in POV-Ray, or a quartic
equations, that can be used to make a
"cigar" shape (like the "convex cylinder")
in my image ?
Tor Olav
--
mailto:tor### [at] hotmail com
http://www.crosswinds.net/~tok/tokrays.html
Post a reply to this message
Attachments:
Download 'invtorus07.jpg' (69 KB)
Preview of image 'invtorus07.jpg'

|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Apparently you have the end parts of each tube piece made with the inside
donut hole of the torus. Try 'inverse' in those. What texture is used exactly?
Is there a 'normal' statement involved or is it just a 'finish'?
Bob
"Tor Olav Kristensen" <tor### [at] hotmail com> wrote in message
news:38FFC5BF.757B1EBB@hotmail.com...
|
| I have made the "fence" in the image below
| from two different shapes, both made with
| a torus.
|
| But there seems to be a problem with the
| light reflections from the texture,
| (which is common to the two shapes;
| Soft_Silver with a Red pigment):
|
| The reflection normal of the surfaces
| appears to make a sudden change of
| direction in the region where the two
| shapes meet.
| (There is only one light source.)
|
| Is this correct behaviour?
|
| (I'm using standard POV-Ray v3.1g for
| Windows.)
|
| And also: Does anyone know of any other
| basic shapes in POV-Ray, or a quartic
| equations, that can be used to make a
| "cigar" shape (like the "convex cylinder")
| in my image ?
|
| Tor Olav
| --
| mailto:tor### [at] hotmail com
| http://www.crosswinds.net/~tok/tokrays.html
--------------------------------------------------------------------------------
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I think the texture difference; while perhaps unintended, looks very cool :>
--
Mike Metheny
lon### [at] vt edu
http://www.loneshepherd.com/
"When one's words are no better than silence, one should keep silent."
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Bob Hughes wrote:
>
> Apparently you have the end parts of each tube piece made with the inside
> donut hole of the torus.
Yes the 'end'-part is done that way: The concave
shape is a difference between a sphere and a torus.
> Try 'inverse' in those.
I have now tried to replace the difference with an
intersection of a sphere and a torus with the
'inverse' keyword. (Is this what you meant?)
==> Same result. No change in the reflections. :(
> What texture is used exactly?
texture { Soft_Silver }
pigment { color Red }
> Is there a 'normal' statement involved or is it just a 'finish'?
No. Just the above two statements.
Extract from the 'texture.inc' file that came
with POV-Ray:
#declare Silver1_Colour = color rgb <0.94, 0.93, 0.83>;
#declare Soft_Silver =
texture {
pigment { Silver1_Colour }
finish {
metallic
ambient 0.2
diffuse 0.35
specular 0.85
roughness 0.01
reflection 0.45
brilliance 1.5
}
}
Tor Olav
--
mailto:tor### [at] hotmail com
http://www.crosswinds.net/~tok/tokrays.html
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Mike Metheny wrote:
>
> I think the texture difference; while perhaps unintended, looks very cool :>
Heh! :)
I was so focused on the problem that I did not see that!
Thank you.
Tor Olav
--
mailto:tor### [at] hotmail com
http://www.crosswinds.net/~tok/tokrays.html
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
"Tor Olav Kristensen" <tor### [at] hotmail com> wrote in message
news:3900C930.F7039ED4@hotmail.com...
|
| I have now tried to replace the difference with an
| intersection of a sphere and a torus with the
| 'inverse' keyword. (Is this what you meant?)
|
| ==> Same result. No change in the reflections. :(
Nope. I was talking about the torus surface itself, maybe if it's inversed then
perhaps the reflection will right itself by then being on the "outside".
Realize though that by turning the torus inside-out then the CSG will
change too. I think that a inverse used in the intersection or difference
should cancel that change.
Rather than try and make guesses I just tried to make such a thing myself
and I couldn't even see any reversed (or whatever) reflection:
light_source { <-5,10,-10> color rgb 1.5
}
camera {
location <-1,1,-10>
angle 25
look_at <0, 0, 0>
}
sphere {0,1
pigment {gradient y color_map {
[0,1 color rgb <.9,.2,.1> color rgb <.2,.4,.8>]
}} scale 30
}
#declare Connector=
union {
difference { // torus core, capped
sphere {0,1}
torus {1.5,1}
translate -y*.6615 // approximation only
}
difference { // torus anti-core
torus {1.5,1}
sphere {0,1 inverse}
translate y*.6615 // approximation only
}
pigment {rgb <.25,1,.25>}
finish {reflection .5}
}
object {Connector
scale <.5,2,.5> rotate <-30,70,-90> translate -y
}
object {Connector
scale <.5,2,.5> rotate <30,-70,90> translate y
}
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Bob Hughes wrote:
>
> Rather than try and make guesses I just tried to make such a thing myself
> and I couldn't even see any reversed (or whatever) reflection:
First: Thank you very much for trying to help me!
I'm quite frustrated, because I need the reflections from this
middle "cigar" shape to behave correctly(?) in other scenes.
I have now included some of my source code below so that you can see
what I'm actually doing.
Note that my convex "cigar" shape is made with a torus that has a
greater minor radius than major radius.
And I now wonder if this could cause the odd change in reflections?
(As I understand from your code, you are making a similar shape by
scaling a sphere along an axis.)
Regards
Tor Olav
--
mailto:tor### [at] hotmail com
http://www.crosswinds.net/~tok/tokrays.html
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
#version 3.1;
#include "colors.inc"
#include "textures.inc"
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
#declare v3Origo = <0, 0, 0>;
#macro Pythagoras(hyp, kat)
sqrt(hyp*hyp - kat*kat)
#end // macro Pythagoras
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
#declare RadW = 1.0; // Max Radius for Wide part (Cigar Shape)
#declare RadN = 0.5; // Min Radius for Narrow part (Spoke shape)
#declare RadMinC = 26; // Minor Radius for Cigar shape
#declare RadMinS = 26; // Minor Radius for Spoke shape
#declare HoleClearing = 0.1;
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
#declare RadMajC = RadMinC - RadW; // Major Radius for Cigar shape
#declare RadMajS = RadMinS + RadN; // Major Radius for Spoke shape
#declare ss = Pythagoras(RadMinC + RadMinS, RadMajC + RadMajS);
#declare tt = ss*RadMinS/(RadMinC + RadMinS);
#declare DistBetween = 2*ss; // RadW + RadN
#declare Cigar =
difference {
sphere { v3Origo, Pythagoras(RadMinC, RadMajC) }
torus { RadMajC, RadMinC }
cylinder { (RadW + RadN)*x, -(RadW + RadN)*x, RadN + HoleClearing }
// plane { y, tt - ss }
// plane { -y, tt - ss }
}
#declare Spoke =
difference {
sphere { v3Origo, vlength(<RadMajS, RadMinS>) }
torus { RadMajS, RadMinS }
plane { y, -tt }
plane { -y, -tt }
}
//#declare SpkCig =
merge {
object { Cigar translate +ss/2*y }
object { Spoke translate -ss/2*y }
texture { Soft_Silver }
pigment { color Red }
}
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I checked out what you had there and also didn't see any way of getting the inside to
become outside, which is the case for that torus with the larger minor radius than
major.
Not that it was going to be possible using inverse or variations thereof (I even gave
scale -1 a try), but as it turns out I couldn't even get the MegaPov
'interior_texture' to
put it right.
This means to me that something goes wrong with that torus. Not a complete surprise
either since it's been said before by other people how that particular shape isn't
reliable.
The problem is in the inner part of the torus, even though usually an outer surface,
ends
up inside itself. So the raytracer must be confusing it entirely.
Bob
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Bob Hughes wrote:
>
> This means to me that something goes wrong with that torus. Not a complete surprise
> either since it's been said before by other people how that particular shape isn't
> reliable.
> The problem is in the inner part of the torus, even though usually an outer surface,
ends
> up inside itself. So the raytracer must be confusing it entirely.
So it is the "ciagar" shape that messes up the
reflections.
That's a pity. =(
Is this to be considered as a bug ?
And if so, do you know if the other people you
mentioned have posted a bug report on the subject?
I have also noticed that this shape is hollow.
And therefore it doesn't behave in CSG operations.
Tor Olav
--
mailto:tor### [at] hotmail com
http://www.crosswinds.net/~tok/tokrays.html
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
I don't know if it's a mathematic problem with the torus and if not then it must be
related to the raytracer.
Maybe there's a possible fix but I'm not one who could even begin to guess the answer.
I think it might have been said to be a "bug", but again I couldn't say. Straining to
remember
I think people were conceding it to be a problem with the raytraced surface and might
not
be
easily fixed. Takes those math geniuses out there (and here) I'm sure.
Bob
"Tor Olav Kristensen" <tor### [at] hotmail com> wrote in message
news:3904F7A6.AF260EC3@hotmail.com...
|
| Bob Hughes wrote:
| >
| > This means to me that something goes wrong with that torus. Not a complete
surprise
| > either since it's been said before by other people how that particular shape isn't
| > reliable.
| > The problem is in the inner part of the torus, even though usually an outer
surface,
ends
| > up inside itself. So the raytracer must be confusing it entirely.
|
| So it is the "ciagar" shape that messes up the
| reflections.
|
| That's a pity. =(
|
| Is this to be considered as a bug ?
|
| And if so, do you know if the other people you
| mentioned have posted a bug report on the subject?
|
| I have also noticed that this shape is hollow.
| And therefore it doesn't behave in CSG operations.
|
| Tor Olav
| --
| mailto:tor### [at] hotmail com
| http://www.crosswinds.net/~tok/tokrays.html
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <3904F7A6.AF260EC3@hotmail.com>, Tor Olav Kristensen
<tor### [at] hotmail com> wrote:
> So it is the "ciagar" shape that messes up the
> reflections.
>
> That's a pity. =(
>
> Is this to be considered as a bug ?
>
> And if so, do you know if the other people you
> mentioned have posted a bug report on the subject?
>
> I have also noticed that this shape is hollow.
> And therefore it doesn't behave in CSG operations.
I think the reason you end up with a "cigar" shape at all is a bug. As I
recall, this is because the bounding gets messed up by the radius
settings, I think someone was working on a fix for it...which wouldn't
give a cigar shape, but the actual torus shape.
--
Christopher James Huff - Personal e-mail: chr### [at] yahoo com
TAG(Technical Assistance Group) e-mail: chr### [at] tag povray org
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chris Huff wrote:
>
> I think the reason you end up with a "cigar" shape at all is a bug.
As far as I remember you do get the torus shape if you do not
subtract it from another shape.
Btw: Are there other shapes that intersects with themselves
like this?
(Maybe one could introduce a new "self_intersection" keyword ? :)
> As I recall,
> this is because the bounding gets messed up by the radius
> settings, I think someone was working on a fix for it...which wouldn't
> give a cigar shape, but the actual torus shape.
But, but, but ...
...How are we supposed to model such cigar shapes then?
(Scaling a sphere along an axis gives a shape that's round
at the ends, while this cigar shape ends in a sharp point.)
Tor Olav
--
mailto:tor### [at] hotmail com
http://www.crosswinds.net/~tok/tokrays.html
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Tor Olav Kristensen wrote:
> But, but, but ...
> ...How are we supposed to model such cigar shapes then?
A lathe can do it with ease and can also be used in CSG operations.
--
Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
In article <390516B5.CA6D79B1@pacbell.net>, lin### [at] povray org
wrote:
> Tor Olav Kristensen wrote:
>
> > But, but, but ...
> > ...How are we supposed to model such cigar shapes then?
>
> A lathe can do it with ease and can also be used in CSG operations.
You can also do it with the poly or quartic objects, and it is quite
easy to do with the isosurface object.
--
Christopher James Huff - Personal e-mail: chr### [at] yahoo com
TAG(Technical Assistance Group) e-mail: chr### [at] tag povray org
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
On Mon, 24 Apr 2000 20:53:25 -0700, Ken <tyl### [at] pacbell net> wrote:
>
>Tor Olav Kristensen wrote:
>
>> But, but, but ...
>> ...How are we supposed to model such cigar shapes then?
>
>A lathe can do it with ease and can also be used in CSG operations.
I have been having exactly the same problem with the chimney of a loco that I
am modelling. I was using a cone with the fillet radii being produced by the
outside surface of two tori. These fillets have a different texture to the rest
of the chimney, presumably because of the normal being the wrong way.
A lathe object should solve this problem, but at the expense of a much more
involved definition requiring a bezier_spline definition.
David
dav### [at] hamiltonite com
http://www.hamiltonite.com/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
David Wilkinson wrote:
> A lathe object should solve this problem, but at the expense of a much more
> involved definition requiring a bezier_spline definition.
This is one of the areas where I will always used an external utility.
Hand coding splines is a waste of time when you can use a utility to
simply point and click your shape definition.
--
Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Ken wrote:
>
> Tor Olav Kristensen wrote:
> > ...How are we supposed to model such cigar shapes then?
>
> A lathe can do it with ease and can also be used in CSG operations.
Thank you. I did not think of that.
(But it would still be nice to have a basic shape like
this one. Because then I wouldn't have to calculate
the co ordinates for the appropriate quadratic_spline or
cubic_spline.)
Btw.: Will such a lathe render slower than my "cigar" shape ?
Tor Olav
--
mailto:tor### [at] hotmail com
http://www.crosswinds.net/~tok/tokrays.html
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Chris Huff wrote:
>
> Ken wrote:
>
> > Tor Olav Kristensen wrote:
> > > ...How are we supposed to model such cigar shapes then?
> >
> > A lathe can do it with ease and can also be used in CSG operations.
>
> You can also do it with the poly or quartic objects, and it is quite
> easy to do with the isosurface object.
I have been thinking about that, but I have not found the
proper equation for that yet.
(Where the minor and major radii are a part of the equation.)
Any suggestions?
And would it be possible to use a quartic object (and an
isosurface) in a CSG expression?
Tor Olav
--
mailto:tor### [at] hotmail com
http://www.crosswinds.net/~tok/tokrays.html
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
David Wilkinson wrote:
> >
> Ken wrote:
> >
> >Tor Olav Kristensen wrote:
> >> ...How are we supposed to model such cigar shapes then?
> >
> >A lathe can do it with ease and can also be used in CSG operations.
>
> I have been having exactly the same problem with the chimney of a loco that I
> am modelling. I was using a cone with the fillet radii being produced by the
> outside surface of two tori. These fillets have a different texture to the rest
> of the chimney, presumably because of the normal being the wrong way.
>
> A lathe object should solve this problem, but at the expense of a much more
> involved definition requiring a bezier_spline definition.
Do you have any suggestions on how to calculate a set of co-ordinates
for a bezier_spline lathe that models such a "cigar" accurately?
Tor Olav
--
mailto:tor### [at] hotmail com
http://www.crosswinds.net/~tok/tokrays.html
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Ken wrote:
>
> David Wilkinson wrote:
>
> > A lathe object should solve this problem, but at the expense of a much more
> > involved definition requiring a bezier_spline definition.
>
> This is one of the areas where I will always used an external utility.
> Hand coding splines is a waste of time when you can use a utility to
> simply point and click your shape definition.
But I can not tell my macros to go and use an external utility...
... Or can I ? :)
Tor Olav
--
mailto:tor### [at] hotmail com
http://www.crosswinds.net/~tok/tokrays.html
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Tor Olav Kristensen wrote:
> But I can not tell my macros to go and use an external utility...
>
> ... Or can I ? :)
...but there is no reason why you cannot create the points for your
lathe object first and then utilize them in your macro.
--
Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Tor Olav Kristensen wrote:
> Btw.: Will such a lathe render slower than my "cigar" shape ?
Lathes can render quickly if you use a linear or quadratic spline.
Cubic splines are little slower. A lot of it depends on how many
points for the spline are specified and how well behaved it is.
If you specify a lot of points or require sharp bends from the
spline is can slow things down. For a simple cigar shape I see
no reason why it would not render in an acceptable amount of
time.
--
Ken Tyler - 1400+ POV-Ray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Tor Olav Kristensen wrote:
>
> Chris Huff wrote:
> >
> > Ken wrote:
> >
> > > Tor Olav Kristensen wrote:
> > > > ...How are we supposed to model such cigar shapes then?
> > >
> > > A lathe can do it with ease and can also be used in CSG operations.
> >
> > You can also do it with the poly or quartic objects, and it is quite
> > easy to do with the isosurface object.
>
> I have been thinking about that, but I have not found the
> proper equation for that yet.
>
> (Where the minor and major radii are a part of the equation.)
>
> Any suggestions?
>
Maybe this is what you are asking about?
Equations for a torus,
major radius R>0 centered at (x,y,z)=(0,0,0)
minor radius r>0 (any value: r<R, r=R, or r>R, all OK)
rotational symmetry axis = z-axis
Parametric equations, depending on parameters s and t from 0 to 2*Pi:
x:=(R+r*cos(t))*cos(s);
y:=(R+r*cos(t))*sin(s);
z:=r*sin(t);
Implicit quartic equation:
0 = (x^2+y^2+z^2+R^2-r^2)^2-4*R^2*(x^2+y^2)
which expands to:
0 = r^4 - 2*x^2*r^2 - 2*y^2*r^2 - 2*r^2*R^2 - 2*r^2*z^2 + R^4 -
2*R^2*x^2 - 2*y^2*R^2 + 2*R^2*z^2 + x^4 + 2*x^2*y^2 + 2*x^2*z^2 +
2*y^2*z^2 + z^4 + y^4
I gave an example of this when replying to a post in this newsgroup by
D. Fontaine, 12-19-99.
Adam C.
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |
|  |
|
 |
Adam Coffman wrote:
>
> Maybe this is what you are asking about?
>
> Equations for a torus,
> ...
Yes. That helped a lot!
Thank you.
> I gave an example of this when replying to a post in this newsgroup by
> D. Fontaine, 12-19-99.
Sorry.
I had not discovered these news groups at that time.
Tor Olav
--
mailto:tor### [at] hotmail com
http://www.crosswinds.net/~tok/tokrays.html
Post a reply to this message
|
 |
|  |
|  |
|
 |
|
 |
|  |