POV-Ray : Newsgroups : povray.binaries.images : calculating normal vector FH Server Time
1 Aug 2024 10:12:31 EDT (-0400)
  calculating normal vector FH (Message 1 to 8 of 8)  
From: B  Gimeno
Subject: calculating normal vector FH
Date: 25 Sep 2008 17:35:00
Message: <web.48dc038462133541a5f67c3f0@news.povray.org>
thread in povray.general

B. Gimeno


Post a reply to this message


Attachments:
Download 'bt_test.jpg' (58 KB)

Preview of image 'bt_test.jpg'
bt_test.jpg


 

From: B  Gimeno
Subject: Re: calculating normal vector FH
Date: 27 Sep 2008 06:05:01
Message: <web.48de045c911f20375989c4ee0@news.povray.org>
"B. Gimeno" <nomail@nomail> wrote:
> thread in povray.general
>
> B. Gimeno

Theory is fine, but understand it and unite with the existing code is a
different story.

I've been trying other methods to "calculate" the normal, like using the same
points of the original object with a differente radius, but it generates
artifacts as this picture shows.

I wonder if even getting correctly calculate the normal vector could it apply to
other kinds of objects like the surface of Klein post <a
href:"http://news.povray.org/web.488a15af4a3fd4ff2380a740%40news.povray.org">
here</a>.

http://news.povray.org/web.488a15af4a3fd4ff2380a740%40news.povray.org

I suppose you know what I mean, the normals should be to reverse as the surface
is folded in on itself generating more artifacts like these. Or not?

B. Gimeno


Post a reply to this message


Attachments:
Download 'bt_test_2.jpg' (70 KB)

Preview of image 'bt_test_2.jpg'
bt_test_2.jpg


 

From: Tim Attwood
Subject: Re: calculating normal vector FH
Date: 27 Sep 2008 19:12:54
Message: <48debdf6@news.povray.org>
> Theory is fine, but understand it and unite with the existing code is a
> different story.
>
> I've been trying other methods to "calculate" the normal, like using the 
> same
> points of the original object with a differente radius, but it generates
> artifacts as this picture shows.
>
> I wonder if even getting correctly calculate the normal vector could it 
> apply to
> other kinds of objects like the surface of Klein post <a
> href:"http://news.povray.org/web.488a15af4a3fd4ff2380a740%40news.povray.org">
> here</a>.
>
> http://news.povray.org/web.488a15af4a3fd4ff2380a740%40news.povray.org
>
> I suppose you know what I mean, the normals should be to reverse as the 
> surface
> is folded in on itself generating more artifacts like these. Or not?

Triangles are still rendered as triangles, the normal is used to
make the highlights act different. The solution to this sort of
thing is to either use more triangles, or switch to isosurfaces.


Post a reply to this message

From: Mike Williams
Subject: Re: calculating normal vector FH
Date: 27 Sep 2008 21:10:01
Message: <web.48ded883911f2037fd79f3f60@news.povray.org>
"Tim Attwood" <tim### [at] comcastnet> wrote:

> Triangles are still rendered as triangles, the normal is used to
> make the highlights act different. The solution to this sort of
> thing is to either use more triangles, or switch to isosurfaces.

I suspect that B. Gimeno's image might possibly be getting the normals inside
out, at least over part of the surface.

Here's a similar image, created with 900 triangles, that doesn't show the same
effect.


Post a reply to this message


Attachments:
Download 'smoothnormals.jpg' (97 KB)

Preview of image 'smoothnormals.jpg'
smoothnormals.jpg


 

From: B  Gimeno
Subject: Re: calculating normal vector FH
Date: 30 Sep 2008 14:05:00
Message: <web.48e269ad911f20375766884d0@news.povray.org>
"B. Gimeno" <nomail@nomail> wrote:
> "B. Gimeno" <nomail@nomail> wrote:

> I suppose you know what I mean, the normals should be to reverse as the surface
> is folded in on itself generating more artifacts like these. Or not?
>
> B. Gimeno

Well, one possible solution would be to pair triangles with the same control
points, each with the normal inverted with respect to its other, which would
lead us to the following conclusion:

The Klein Surface is "a one-side borderless surface with two sides".

B. Gimeno


Post a reply to this message

From: B  Gimeno
Subject: Re: calculating normal vector FH
Date: 30 Sep 2008 14:10:00
Message: <web.48e26b25911f20375766884d0@news.povray.org>
"Tim Attwood" <tim### [at] comcastnet> wrote:

> Triangles are still rendered as triangles, the normal is used to
> make the highlights act different. The solution to this sort of
> thing is to either use more triangles, or switch to isosurfaces.

Thanks for your suggestions, but:
I can not use isosurfaces or increase the number of triangles as they are used
to draw patterns according to parameters
(examples http://www.persistencia.org/bt_tesel.htm )

Thanks anyway
B. Gimeno.


Post a reply to this message

From: B  Gimeno
Subject: Re: calculating normal vector FH
Date: 30 Sep 2008 14:20:00
Message: <web.48e26d3d911f20375766884d0@news.povray.org>
"Mike Williams" <nomail@nomail> wrote:
> "Tim Attwood" <tim### [at] comcastnet> wrote:
>
> I suspect that B. Gimeno's image might possibly be getting the normals inside
> out, at least over part of the surface.
>
> Here's a similar image, created with 900 triangles, that doesn't show the same
> effect.

Curious object, does it tried to be a torus shape?
If so, let me see your code, the use of cross-reference between sine and cosine
functions is wrong and is beyond my level of English and the google's automatic
translator  ake myself understood, but I think I still remember how to get a
decent torus with a nested-loop.

A greeting
B. Gimeno


Post a reply to this message

From: Mike Williams
Subject: Re: calculating normal vector FH
Date: 30 Sep 2008 15:24:40
Message: <gc2XgwMszn4IFwOT@econym.demon.co.uk>
Wasn't it B. Gimeno who wrote:
>"Mike Williams" <nomail@nomail> wrote:
>> "Tim Attwood" <tim### [at] comcastnet> wrote:
>>
>> I suspect that B. Gimeno's image might possibly be getting the normals inside
>> out, at least over part of the surface.
>>
>> Here's a similar image, created with 900 triangles, that doesn't show 
>>the same
>> effect.
>
>Curious object, does it tried to be a torus shape?
>If so, let me see your code, the use of cross-reference between sine and cosine
>functions is wrong and is beyond my level of English and the google's automatic
>translator  ake myself understood, but I think I still remember how to get a
>decent torus with a nested-loop.

It's called a Bohemian Dome.

It's the shape that you get if you hold a circle flat and sweep it 
around a circle. For a torus, the diameter of the swept circle always 
points to the centre of the torus. For a Bohemian Dome the diameter of 
the circle always point in the same direction.

The surface intersects itself. The side that is the inside on one half 
is the outside on the other half. And POV even gets that right: it uses 
the interior_texture on the outside of one half.

It's generated by these parametric equations:
          x = A*cos(u)
          y = B*cos(v) + A*sin(u)
          z = C*sin(v)

Code to create it using a parametric isosurface (seriously slow) or 
using Ingo Janssen's "param.inc" to create a smooth mesh2 to approximate 
it (fast) can be found here:
          http://www.econym.demon.co.uk/isotut/param.htm

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.