|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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>
1
}
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?
Thanks!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Op 11/08/2020 om 07:30 schreef Cyningstan:
>
> For example:
>
> camera {
> location <0, 0, -10>
> look_at <0, 0, 0>
> }
>
> cylinder {
> <0 0 -1.25>
> <0 0 1.25>
> 1
> }
Not sure if this is the cause, but I am missing the ",". To be
unambiguous, you should write:
cylinder {
<0, 0, -1.25>,
<0, 0, 1.25>,
1
}
>
> 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>
Same here:
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?
>
> Thanks!
>
>
--
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thomas de Groot <tho### [at] degrootorg> wrote:
> Not sure if this is the cause, but I am missing the ",". To be
> unambiguous, you should write:
Thanks, Thomas! You're absolutely right, it was the missing commas. I made the
mistake in one place and then copied and adapted it all over the place without
noticing.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Op 11/08/2020 om 10:18 schreef Cyningstan:
>
> Thomas de Groot <tho### [at] degrootorg> wrote:
>
>> Not sure if this is the cause, but I am missing the ",". To be
>> unambiguous, you should write:
>
> Thanks, Thomas! You're absolutely right, it was the missing commas. I made the
> mistake in one place and then copied and adapted it all over the place without
> noticing.
>
>
Excellent! I have a dim memory of an explanation some time ago by Alain
Martel about /why/ omitting the commas is ambiguous. I cannot find it
presently.
--
Thomas
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Le 2020-08-11 à 01:30, Cyningstan a écrit :
>
> 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:
> cylinder {
> <0 0 -1.25>
> <0 0 1.25>
> 1
> }
>
This get interpreted as :
cylinder{<0, 0-1.25> <0,0,1.25> 1}
You can ignore the comas, but only in unambiguous cases. Whenever you
have a negative value, the coma is mandatory in front of it.
There was a time, prior to version 3.0, where the space was a hard
separator and when your way of defining the vector was interpreted as
<0,0,-1.25>. It's been over 30 years that it's no longer the case.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
We've all done something like this at one time or another.
Those commas hide sometimes!
Have fun!
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|