POV-Ray : Newsgroups : povray.object-collection : Is this the right group to discuss details of an object in the collection? : Re: Is this the right group to discuss details of an object in the collecti= Server Time
18 Apr 2024 13:05:26 EDT (-0400)
  Re: Is this the right group to discuss details of an object in the collecti=  
From: Chris B
Date: 8 Nov 2007 09:35:17
Message: <47331ea5@news.povray.org>
"Leef_me" <nomail@nomail> wrote in message 
news:web.4732b8c8e76f755f892adb1d0@news.povray.org...
>
> Here's my reworked scroll code. I wanted to focus on determining and
> understanding why I get the text on both sides of the scroll and why the 
> weird
> pattern appears on the flat portion of the scroll.
>
>     You will need the include file from "Scroll    Version: chrisb 1.0"
>     look here       http://lib.povray.org/searchcollection/index.php
>
> Leef_me
>

Hi,
The problem is in the macro inside the "Scroll_array2mesh2.inc" file which 
defines the triangles that make up the mesh object. Alternating triangles 
are defined clockwise then anticlockwise causing the normals for each 
triangle to point in the opposite direction to the previous triangle. So on 
each side of the surface, half the area is 'interior' and half is 
'exterior'.

To fix this, replace the 3 identical lines 123, 136 and 149 with copies of 
the following line

          <Scroll_J+1+(Scroll_I+1)*Scroll_JTotal, 
Scroll_J+1+Scroll_I*Scroll_JTotal, Scroll_J+(Scroll_I+1)*Scroll_JTotal>

This just changes the sequence of every second set of triangles so that both 
sets are defined in the same direction, giving it a consistent 'interior' 
and 'exterior'.

Regards,
Chris B.


Post a reply to this message

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