POV-Ray : Newsgroups : povray.newusers : sphere proportions Server Time20 Jun 2024 12:35:44 EDT (-0400)
 sphere proportions (Message 1 to 10 of 24)
 From: Psnarf Subject: sphere proportions Date: 31 May 2021 12:30:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.60b50ee238c338a88b87fe773aaaf4dc%40news.povray.org",
"dateCreated": "2021-05-31T16:30:00+00:00",
"datePublished": "2021-05-31T16:30:00+00:00",
"author": {
"@type": "Person",
"name": "Psnarf"
}
}
In a square window,
sphere {
<0, 1, 2>, 2
texture {
pigment { color Yellow }
}
}
produces an ellipsoid, the vertical radius is larger than the horizontal radius:
`povray -Idemo.pov +V +W400 +H400`

Apparently, the window proportion must be 1:1.33 in order to produce a sphere
with a fixed radius. Should not sphere appear circular no matter what the window
proportions in the render command?
```

Attachments:

Preview of image 'demo.png'

 From: Psnarf Subject: Re: sphere proportions Date: 31 May 2021 12:35:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.60b50f92dfb9240b8b87fe773aaaf4dc%40news.povray.org",
"dateCreated": "2021-05-31T16:35:00+00:00",
"datePublished": "2021-05-31T16:35:00+00:00",
"author": {
"@type": "Person",
"name": "Psnarf"
}
}
> the window proportion must be 1:1.33
....such as 640x480 or 520x390
```
 From: jr Subject: Re: sphere proportions Date: 31 May 2021 12:40:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.60b5109fdfb9240b79819d986cde94f1%40news.povray.org",
"dateCreated": "2021-05-31T16:40:00+00:00",
"datePublished": "2021-05-31T16:40:00+00:00",
"author": {
"@type": "Person",
"name": "jr"
}
}
hi,

"Psnarf" <nomail@nomail> wrote:
> In a square window,
> sphere {
>     <0, 1, 2>, 2
>     texture {
>         pigment { color Yellow }
>     }
> }
> produces an ellipsoid, the vertical radius is larger than the horizontal radius:
> `povray -Idemo.pov +V +W400 +H400`
>
> Apparently, the window proportion must be 1:1.33 in order to produce a sphere
> with a fixed radius. Should not sphere appear circular no matter what the window
> proportions in the render command?

depends on the 'right' vector of your camera.
<https://wiki.povray.org/content/Reference:Camera#Index_Entry_right_camera>

regards, jr.
```
 From: Psnarf Subject: Re: sphere proportions Date: 31 May 2021 13:25:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.60b51b13dfb9240b8b87fe773aaaf4dc%40news.povray.org",
"dateCreated": "2021-05-31T17:25:00+00:00",
"datePublished": "2021-05-31T17:25:00+00:00",
"author": {
"@type": "Person",
"name": "Psnarf"
}
}
"jr" <cre### [at] gmailcom> wrote:
> hi,
....
> depends on the 'right' vector of your camera.
> <https://wiki.povray.org/content/Reference:Camera#Index_Entry_right_camera>
>
>
> regards, jr.

Thank you, jr. I am a noob, running the demo.pov from the tutorial. I haven't
come to the camera, yet. As the poet Frost might say, I have miles to go before
I can create anything worthy of the top-100.
```
 From: jr Subject: Re: sphere proportions Date: 31 May 2021 14:00:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.60b5236ddfb9240b79819d986cde94f1%40news.povray.org",
"dateCreated": "2021-05-31T18:00:00+00:00",
"datePublished": "2021-05-31T18:00:00+00:00",
"author": {
"@type": "Person",
"name": "jr"
}
}
hi,

"Psnarf" <nomail@nomail> wrote:
> "jr" <cre### [at] gmailcom> wrote:
> ....
> Thank you, jr. I am a noob, running the demo.pov from the tutorial. I haven't
> come to the camera, yet. As the poet Frost might say, I have miles to go before
> I can create anything worthy of the top-100.

you're welcome.  hope you will find "povving" a pleasant hobby.  re camera,
personally I like to use an aspect ratio (eg "right * (16/9)"), because it's

regards, jr.
```
 From: jr Subject: Re: sphere proportions Date: 31 May 2021 14:05:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.60b524bcdfb9240b79819d986cde94f1%40news.povray.org",
"dateCreated": "2021-05-31T18:05:00+00:00",
"datePublished": "2021-05-31T18:05:00+00:00",
"author": {
"@type": "Person",
"name": "jr"
}
}
"jr" <cre### [at] gmailcom> wrote:
> ...> personally I like to use an aspect ratio (eg "right * (16/9)"), because

sheesh..  should read "right x * (16/9)".  sorry.

regards, jr.
```
 From: Bald Eagle Subject: Re: sphere proportions Date: 31 May 2021 14:25:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.60b52929dfb9240b1f9dae3025979125%40news.povray.org",
"dateCreated": "2021-05-31T18:25:00+00:00",
"datePublished": "2021-05-31T18:25:00+00:00",
"author": {
"@type": "Person",
"name": "Bald Eagle"
}
}
"jr" <cre### [at] gmailcom> wrote:
> "jr" <cre### [at] gmailcom> wrote:
> > ...> personally I like to use an aspect ratio (eg "right * (16/9)"), because
>
> sheesh..  should read "right x * (16/9)".  sorry.

Yes,  and a lot of us are lazy and very naughty and use:

right x*image_width/image_height

https://wiki.povray.org/content/Knowledgebase:Language_Questions_and_Tips#Topic_19

It's worth pointing out at this early stage that "x" is a reserved keyword,
shorthand for the cardinal x basis vector, <1, 0, 0>.

So after multiplying, you get: <image_width/image_height, 0, 0>

Maybe this will help explain better, or help to further confuse you...  :D

&toff=50
```
 From: Psnarf Subject: Re: sphere proportions Date: 1 Jun 2021 13:35:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.60b66e93dfb9240b8b87fe773aaaf4dc%40news.povray.org",
"dateCreated": "2021-06-01T17:35:00+00:00",
"datePublished": "2021-06-01T17:35:00+00:00",
"author": {
"@type": "Person",
"name": "Psnarf"
}
}
> x*image_width/image_height = <image_width/image_height, 0, 0>
> "x" is a reserved keyword, shorthand for the cardinal x basis vector, <1, 0, 0>.

That seems intuitive. Thanks for the tip!

Obquote:
And quid pro quo.
So little time,
And so much to know." -J. Hillary Boob, Phud.
```
 From: Psnarf Subject: Re: sphere proportions Date: 1 Jun 2021 13:40:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.60b6701edfb9240b8b87fe773aaaf4dc%40news.povray.org",
"dateCreated": "2021-06-01T17:40:00+00:00",
"datePublished": "2021-06-01T17:40:00+00:00",
"author": {
"@type": "Person",
"name": "Psnarf"
}
}
The code for demo.pov:

#include "colors.inc"    // The include files contain
#include "stones.inc"    // pre-defined scene elements

camera {
location <0, 2, -3>
look_at  <0, 1,  2>
}

sphere {
<0, 1, 2>, 2
texture {
pigment { color Yellow }
}
}

light_source { <2, 4, -3> color White}

-=-=-=-=-=-=-=-=-
Why does the radius of the sphere change if the render window is not 1:1.333?
A ratio of 1:1.777 (16/9) produces the attached image.
```

Attachments:

Preview of image 'demo.png'

 From: jr Subject: Re: sphere proportions Date: 1 Jun 2021 14:00:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.60b674e9dfb9240b79819d986cde94f1%40news.povray.org",
"dateCreated": "2021-06-01T18:00:00+00:00",
"datePublished": "2021-06-01T18:00:00+00:00",
"author": {
"@type": "Person",
"name": "jr"
}
}
hi,

"Psnarf" <nomail@nomail> wrote:
> The code for demo.pov:
>
> #include "colors.inc"    // The include files contain
> #include "stones.inc"    // pre-defined scene elements
>
> camera {
>     location <0, 2, -3>
>     look_at  <0, 1,  2>
> }
>
> sphere {
>     <0, 1, 2>, 2
>     texture {
>         pigment { color Yellow }
>     }
> }
>
> light_source { <2, 4, -3> color White}
>
> -=-=-=-=-=-=-=-=-
> Why does the radius of the sphere change if the render window is not 1:1.333?
> A ratio of 1:1.777 (16/9) produces the attached image.

when I cut'n'paste the above in a file and render it all defaults (here 4/3, ie
960x720), the sphere's round.  if I insert 'right x * (16/9)' in the camera, and
render with '+w960 +h540', the sphere's round.

if you do not want to modify the camera, you'll have to stick with the (default)
4/3 aspect to see the shape you expect.

regards, jr.
```