POV-Ray : Newsgroups : povray.general : Bugs? Torus and SOR Tutorials Server Time
6 Aug 2024 00:12:43 EDT (-0400)
  Bugs? Torus and SOR Tutorials (Message 1 to 5 of 5)  
From: Jenni A M  Merrifield
Subject: Bugs? Torus and SOR Tutorials
Date: 16 Jul 2002 00:49:36
Message: <3d33a5e0@news.povray.org>
Hi, I'm a "newbie user" of POV so the first thing I guess I'll do is say
"Hi!"  I've always wanted to try 3D Rendering and if I'd had any idea there
was a free ray-tracer out there prior to last week I would have been doing
it a lot sooner.  Now I just have to figure out how to turn off the ideas in
my head while I'm at work so I can actually get something done... ;-)

  In any case, because I'm new, I've been going through the beginner
tutorial and I think I may have found a couple of bugs/errors -- one in the
torus section of the tutorial and one in the SOR section.

  Actually, I understand that the Surface of Revolution tutorial issue has
already been posted here once -- you see, I made the very *egregious* error
of not reading everything in the FAQ group and so I managed to overlook both
copies of the "bug reporting" post.  This, of course, means I attempted to
post a bug report to the bugreport group, and the moderator of that group
explained what I should have done and mentioned the previous thread
regarding the SOR bug --However, I can't seem to find the previous thread
(perhaps it's been deleted already, I don't know -- the earliest item
LookOut ... er... Outlook Express loaded in this group is dated as of July
10th) which means that I don't know what the technical details were, and
since it could have been different than my system I think that, perhaps, it
would be best to provide a report on that bug as well (but I'll do it
second, so you can skip it easily if you want! :-D).

*****************************************
Technical Details:
- POV-RAY v3.5 for Windows
- Windows XP Professional (v 5.1.2600 Build 2600)
- Intel Celeron processor, 367 MHz
- 256 MB RAM

*****************************************
Torus Tutorial:

  If you follow the steps given for the torus demo exactly, adding, removing
and changing things as specified, the script you end up with displays a
green link chain rather than the golden chain that is expected.  This, it
seems, is because, at the point where the script is modified to create a
"chain link" by making a union of the chain segments and half-tori and
applying the "Chain_Gold" texture declaration to it, the pigment entries in
the original "Half_Torus" and "Chain_Segment" declarations, which are still
in place, are being used instead of the "Chain_Gold" texture applied to the
union.

  Now the above, of course, assumes that the fact that the "Chain_Gold"
texture definition isn't over-riding the "Green" pigment definition of the
base items is a bug.  It did occur to me that, perhaps, this behavour was
"by design" -- in which case the "bug" is in the tutorial itself which
should expliticly specify that the pigment entries in the "Half_Torus" and
"Chain_Segment" declarations should be removed.  However, given the help
file description of "Layered Textures" though, my original expectation that
a non-transparent texture applied to a union of objects later would
completely blanket any previously assigned pigment or texture, while a
transparent one would allow parts of the previous colour to show through.

  Here is the script from the tutorial which produces a green chain instead
of a gold one for me:

*****
  #include "colors.inc"
  camera {
    location <0, .1, -25>
    look_at 0
    angle 30
  }
  background { color Gray50 }
  light_source{ <300, 300, -1000> White }
  #declare Half_Torus = difference {
    torus {
      4,1
      sturm
      rotate x*-90  // so we can see it from the top
    }
    box { <-5, -5, -1>, <5, 0, 1> }
    pigment { Green }         // <---- GREEN PIGMENT on Half_Torus
  }

  #declare Chain_Segment = cylinder {
    <0, 4, 0>, <0, -4, 0>, 1
    pigment { Green }         // <---- GREEN PIGMENT on Chain_Segment
  }

  #declare Flip_It_Over = x*180;
  #declare Torus_Translate = 8;

  #declare Chain_Gold = texture {
    pigment { BrightGold }
    finish {
      ambient .1
      diffuse .4
      reflection .25
      specular 1
      metallic
    }
  }

  #declare Link = union {
    object {
      Half_Torus
      translate y*Torus_Translate/2
    }
    object {
      Half_Torus
      rotate Flip_It_Over
      translate -y*Torus_Translate/2
    }
    object {
      Chain_Segment
      translate x*Torus_Translate/2
    }
    object {
      Chain_Segment
      translate -x*Torus_Translate/2
    }
    texture { Chain_Gold }         // <---- GOLD TEXTURE on Link
  }

  #declare Link_Translate = Torus_Translate*2-2*y;

  #declare Link_Pair =
  union {
    object { Link }
    object { Link translate y*Link_Translate rotate y*90 }
  }

  #declare Chain = union {
    object { Link_Pair}
    object { Link_Pair translate  y*Link_Translate*2 }
    object { Link_Pair translate  y*Link_Translate*4 }
    object { Link_Pair translate  y*Link_Translate*6 }
    object { Link_Pair translate -y*Link_Translate*2 }
    object { Link_Pair translate -y*Link_Translate*4 }
    object { Link_Pair translate -y*Link_Translate*6 }
  }

  object { Chain scale .1 rotate <0, 45, -45> }
*****

*****************************************
SOR Tutorial:

  Since this has apparently been addressed before, I'll keep it short. :-)

  Basic problem -- when attempting to render the SOR from the tutorial,
instead of showing the hollow interior of the cup, ready to hold your best
mead, the cup is sealed off with a flat cap.  The proper cup, however, could
be generated using the same set of points in the lathe command with a
cubic_spline.

  If a Surface of Rotation is supposed to have a cap, then the image in the
tutorial is wrong.  On the other hand, if it's not supposed to be capped,
then there would appear to be a bug in the program.

  Here's a script I created which compares the SOR and lathe renderings of
the gold cup from the tutorial. It also contains 'rods' that hover just over
the mouth of each cup to show, by shadow and reflection, that the SOR cup is
definitely "capped" while the lathe cup is not.

*****
  #include "colors.inc"
  #include "golds.inc"

  global_settings { assumed_gamma 2.2 }

  camera {
    location <0, 20, -26>
    look_at <0, 5, 0>
    angle 45
  }

  background { color rgb<0.2, 0.4, 0.8>  }

  light_source { <100, 100, -101> color rgb 1 }

  plane {
    y, 0
    pigment { checker color Red, color Green scale 5 }
  }

 // declare a text object to identify the Surface of Revolution
 #declare SOR = text {
    ttf "Arial.ttf" "sor" .1, 0
    pigment { Black }
    finish { specular 1 }
    scale 2
  }

 // calculate the x-length of SOR
  #declare LEN_SOR = x*(max_extent(SOR)-min_extent(SOR));

 // declare a text object to identify the Lathe object
  #declare LATHE = text {
    ttf "Arial.ttf" "lathe" .1, 0
    pigment { Black }
    finish { specular 1 }
    scale 2
  }

 // calculate the x-length of LATHE
  #declare LEN_LATHE = x*(max_extent(LATHE)-min_extent(LATHE));


  // declare a shape that can be used to show reflective properties
  #declare ROD = cylinder {
    < 0, 11,-4>, < 0, 10.7, 4>, 0.25
     pigment { NeonPink }
     finish { phong 1 }
  }


 // create the cup, using SOR, and union with the SOR and ROD objects
 union {
   sor {
     8,
     <0.0,  -0.5>,
     <3.0,   0.0>,
     <1.0,   0.2>,
     <0.5,   0.4>,
     <0.5,   4.0>,
     <1.0,   5.0>,
     <3.0,  10.0>,
     <4.0,  11.0>
     texture { T_Gold_1B }
   }
   object {
    SOR
     translate -x*LEN_SOR/2  // center the word on the cup
     translate y* 0.2     // Move the word up so it will rest on top of the
base of the cup
     translate z*-2.5     // move the word forward slightly
  }
   object { ROD }
    translate -x*5       // move the whole union 5 units in the negative x
direction
 }

 // create the cup, using Lathe, and union with the LATHE and ROD objects
 union {
   lathe {
     cubic_spline
     8,
     <0.0,  -0.5>,
     <3.0,   0.0>,
     <1.0,   0.2>,
     <0.5,   0.4>,
     <0.5,   4.0>,
     <1.0,   5.0>,
     <3.0,  10.0>,
     <4.0,  11.0>
     texture { T_Gold_1B }
   }
   object {
    LATHE
     translate -x*LEN_LATHE/2 // center the word on the cup
     translate y* 0.2     // Move the word up so it will rest on top of the
base of the cup
     translate z*-2.5     // move the word forward slightly
  }
   object { ROD }
    translate x*5        // move the whole union 5 units in the positive x
direction
}
*****

  Thanks for your time. :-)

Jenni A.M. Merrifield
-=> strawberryJAMM <=-


Post a reply to this message

From: hughes b
Subject: Re: Bugs? Torus and SOR Tutorials
Date: 16 Jul 2002 03:05:32
Message: <3d33c5bc$1@news.povray.org>
Hi and welcome Jenni.

The gold chain script is supposed to undergo a change during creation.
Looking it up, I quote from there at section 3.2.5 Torus Object (about 2/3
way down):

"We render this and voila! A single link of a chain. But we aren't done yet!
Whoever heard of a green chain? We would rather use a nice metallic color
instead. First, we remove any pigment blocks in the declared tori and
cylinders. Then we add the following before the union:"

Unless there's another place in the Doc I didn't see with that torusdemo.pov
script which is in error it seems okay to me.

Now, about that sor thing. Gee... well, I sure thought that had been fixed
up in the Doc long ago. Maybe it had been and was redone wrong again. I
believe the keyword open should be there. If I had a previous version handy
I'd take a look, but I don't just now.


Post a reply to this message

From: Alan Kong
Subject: Re: Bugs? Torus and SOR Tutorials
Date: 16 Jul 2002 03:14:38
Message: <qlh7ju4vq5d94ao3qvo9aesbr9ald4ortl@4ax.com>
On Mon, 15 Jul 2002 21:51:08 -0700 Jenni A.M. Merrifield wrote:

>This, of course, means I attempted to
>post a bug report to the bugreport group, and the moderator of that group
>explained what I should have done and mentioned the previous thread
>regarding the SOR bug --However, I can't seem to find the previous thread

<snip..>

  You sound appropriately confused, Jenni. This is understandable
because I indicated that the report in question was posted in p.general,
when in fact, it was posted to p.documentation.inbuilt. See Message I.D.
3d323551@news.povray.org. While other folks have reasoned that it was
not perhaps the best group to post, I feel that posting such an article
in p.general benefits more people. Sorry for misleading you.

  Thanks also for your very thorough report!

-- 
Alan
ako### [at] povrayorg
a k o n g <at> p o v r a y <dot> o r g


Post a reply to this message

From: Robert Chaffe
Subject: Re: Bugs? Torus and SOR Tutorials
Date: 16 Jul 2002 21:30:26
Message: <3d34c8b2@news.povray.org>
"hughes b" <omn### [at] charternet> wrote in message news:3d33c5bc$1@news.povray.org...
>
> [snip]
>
> Now, about that sor thing. Gee... well, I sure thought that had been fixed
> up in the Doc long ago. Maybe it had been and was redone wrong again. I
> believe the keyword open should be there. If I had a previous version handy
> I'd take a look, but I don't just now.

I think the missing open keyword in that docu. example goes back to version 2.2, if my
memory serves.  As most everyone was
concentrating on new features during beta testing, I can see how this would slip
through again.

--
Robert Chaffe
http://www.donovansweb.com/~chaffe/


Post a reply to this message

From: Jenni A M  Merrifield
Subject: Re: Bugs? Torus and SOR Tutorials
Date: 18 Jul 2002 01:46:20
Message: <3d36562c@news.povray.org>
Thanks for the welcome, and you're absolutely right - it does say to
remove the pigment blocks in the declared tori and cylinders as you say.
Which is interesting, because I double and tripple checked the documents
before I decided it was worth posting as a possible bug!

  This suggests that the problem is that the instruction is embedded in the
text and there is no example showing the change, whereas I did recall that
many of the other examples throughout the tutorial would show code blocks
for all the changes and not just for the newest additions.

  As a User Experience professional, I would suggest that although the
documentation is technically correct, it would be more obvious what the user
was expected to do (and also far less likely that a user might "miss" that
particular required step) I would suggest combinging the textual description
for the removal of pigments, the declaration of "Chain_Gold" and changing
the previously defined union to a declaration for "Link" with the
"Chain_Gold" texture added, and then showing an example that includes every
code block that was just added or required changes to according to the
steps:

EXAMPLE:

We render this [Ed: the script developed up to that point] and voila! A
single link of a chain. But we aren't done yet! Whoever heard of a green
chain? We would rather use a nice metallic color instead. First, we remove
any pigment blocks in the declared tori and cylinders. Then we add a
declaration for a golden texture just before the union that creates the
link.  Finally, we add the texture to the union and declare it as a single
link:
  #declare Half_Torus = difference {
    torus {
      4,1
      sturm
      rotate x*-90  // so we can see it from the top
    }
    box { <-5, -5, -1>, <5, 0, 1> }
  }
  #declare Chain_Segment = cylinder {
    <0, 4, 0>, <0, -4, 0>, 1
  }
  #declare Chain_Gold = texture {
    pigment { BrightGold }
    finish {
      ambient .1
      diffuse .4
      reflection .25
      specular 1
      metallic
    }
  }
  #declare Link = union {
    object {
      Half_Torus
      translate y*Torus_Translate/2
    }
    object {
      Half_Torus
      rotate Flip_It_Over
      translate -y*Torus_Translate/2
    }
    object {
      Chain_Segment
      translate x*Torus_Translate/2
    }
    object {
      Chain_Segment
      translate -x*Torus_Translate/2
    }    texture { Chain_Gold }
  }
END EXAMPLE

  This would be much easier for a user to understand, because the results of
all the steps mentioned in the text are now made visible in the example. :-)

  Anyway -- thanks also for the tip about needing an "open" keyword -- if
I'd thought to take a look at the Language Reference for the sor shape I
might have thought to try that, but I hadn't quite gotten past the "follow
the tutorial" stage yet, so it never occured to me. :-)

   I do hope something gets posted to the official bugreports list about
this ommission though... otherwise you can expect lots of newbies to notice
and bring up the issue!

Jenni

--
Jenni A. M. Merrifield
-=> strawberryJAMM <=-
strawberry @ jamm.com

"hughes b" <omn### [at] charternet> wrote in message
news:3d33c5bc$1@news.povray.org...
> Hi and welcome Jenni.
>
> The gold chain script is supposed to undergo a change during creation.
> Looking it up, I quote from there at section 3.2.5 Torus Object (about 2/3
> way down):
>
> "We render this and voila! A single link of a chain. But we aren't done
yet!
> Whoever heard of a green chain? We would rather use a nice metallic color
> instead. First, we remove any pigment blocks in the declared tori and
> cylinders. Then we add the following before the union:"
>
> Unless there's another place in the Doc I didn't see with that
torusdemo.pov
> script which is in error it seems okay to me.
>
> Now, about that sor thing. Gee... well, I sure thought that had been fixed
> up in the Doc long ago. Maybe it had been and was redone wrong again. I
> believe the keyword open should be there. If I had a previous version
handy
> I'd take a look, but I don't just now.
>
>
>


Post a reply to this message

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