POV-Ray : Newsgroups : povray.newusers : Odd transformation of cylinders : Odd transformation of cylinders Server Time
18 May 2024 05:41:45 EDT (-0400)
  Odd transformation of cylinders  
From: Cyningstan
Date: 11 Aug 2020 01:35:00
Message: <web.5f322ce4e7e86bcf88e55160@news.povray.org>
I'm not "new" to POV-Ray but returning to it after a number of years. But this
problem I've run into is definitely in newbie territory.

I'm building up a basic scene currently using only spheres and cylinders. The
spheres are acting as I'd expect, but the cylinders are having an odd
transformation applied to them that I have to undo. They're all being rotated
-45 degrees around the X axis, and translated down by whatever their radius is.
For example:

camera {
  location <0, 0, -10>
  look_at  <0, 0,  0>

cylinder {
  <0 0 -1.25>
  <0 0 1.25>

This isn't the full scene; I've omitted lighting and textures for brevity. I'd
expect to be looking at this cylinder end-on, but it's actually rotated -45
degrees and moved down -1, so I'm looking at the top side. I have to bring it
back to where I expect with the following:

  rotate <+45 0 0>
  translate <0 0 +1>

My 0.5 radius cylinders need translating up +0.5 on the Z axis, and all
cylinders need a +45 degree correction on the X axis.

Neither the tutorial nor the reference section on the cylinder give me any clue
as to why this weird transformation is being applied to all my cylinders, and I
don't remember having this problem last time I built a scene about seven years
ago. Is there something obvious I'm missing?


Post a reply to this message

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