POV-Ray : Newsgroups : povray.newusers : image spherical projection and postscript. Server Time
24 Dec 2024 23:39:26 EST (-0500)
  image spherical projection and postscript. (Message 1 to 5 of 5)  
From: zeycus
Subject: image spherical projection and postscript.
Date: 2 Feb 2008 05:55:00
Message: <web.47a44adec0e4bb1b5f201c20@news.povray.org>
Hi everybody,

I have a bitmap I want to project onto the surface of a sphere. I want to use
spherical projection, so that the image is not distorted. The problem is that I
want to control the angle covered (measured from the center of the sphere). One
solution would be to increase the bitmap size with nothing around, but that is
ugly. What is the correct way to do this?

Another question: I am using a bitmap obtained from a postscript file I have,
because I did not find the way to use the PS directly. Is it possible?

Thanks in advance.


Post a reply to this message

From: Chris B
Subject: Re: image spherical projection and postscript.
Date: 2 Feb 2008 07:19:50
Message: <47a45fe6$1@news.povray.org>
"zeycus" <mig### [at] onocom> wrote in message 
news:web.47a44adec0e4bb1b5f201c20@news.povray.org...
> Hi everybody,
>
> I have a bitmap I want to project onto the surface of a sphere. I want to 
> use
> spherical projection, so that the image is not distorted. The problem is 
> that I
> want to control the angle covered (measured from the center of the 
> sphere). One
> solution would be to increase the bitmap size with nothing around, but 
> that is
> ugly. What is the correct way to do this?
>

Hi,

Use the 'once' keyword and scale in 'x'  to get a segment (or scale in 'y' 
and translate in 'y' to get a ring around the middle of the sphere).

light_source { <-15,7.5,-15>, rgb 2}
camera {location <0,3,0> look_at <0,0,0>}

sphere {0,1
  texture {
    pigment {
      image_map {sys "ngtest11.bmp" once}
      scale 0.6*x
      rotate x*90
      warp {spherical
        orientation y
        dist_exp 1
      }
    }
  }
}


> Another question: I am using a bitmap obtained from a postscript file I 
> have,
> because I did not find the way to use the PS directly. Is it possible?
>

No. The valid bitmap types are "gif | tga | iff | ppm | pgm | png | jpeg | 
tiff | sys".
No vector graphics formats are supported.

Regards,
Chris B.


Post a reply to this message

From: Warp
Subject: Re: image spherical projection and postscript.
Date: 2 Feb 2008 07:29:08
Message: <47a46214@news.povray.org>
zeycus <mig### [at] onocom> wrote:
> I have a bitmap I want to project onto the surface of a sphere. I want to use
> spherical projection, so that the image is not distorted. The problem is that I
> want to control the angle covered (measured from the center of the sphere). One
> solution would be to increase the bitmap size with nothing around, but that is
> ugly. What is the correct way to do this?

  Apply this tip using the spherical warp:

http://tag.povray.org/povQandT/languageQandT.html#cylindricalrepeat

-- 
                                                          - Warp


Post a reply to this message

From: zeycus
Subject: Re: image spherical projection and postscript.
Date: 3 Feb 2008 10:25:01
Message: <web.47a5dc66a2a0ea67b5f201c20@news.povray.org>
"Chris B" <nom### [at] nomailcom> wrote:
> "zeycus" <mig### [at] onocom> wrote in message
> news:web.47a44adec0e4bb1b5f201c20@news.povray.org...
> > Hi everybody,
> >
> > I have a bitmap I want to project onto the surface of a sphere. I want to
> > use
> > spherical projection, so that the image is not distorted. The problem is
> > that I
> > want to control the angle covered (measured from the center of the
> > sphere). One
> > solution would be to increase the bitmap size with nothing around, but
> > that is
> > ugly. What is the correct way to do this?
> >
>
> Hi,
>
> Use the 'once' keyword and scale in 'x'  to get a segment (or scale in 'y'
> and translate in 'y' to get a ring around the middle of the sphere).
>
> light_source { <-15,7.5,-15>, rgb 2}
> camera {location <0,3,0> look_at <0,0,0>}
>
> sphere {0,1
>   texture {
>     pigment {
>       image_map {sys "ngtest11.bmp" once}
>       scale 0.6*x
>       rotate x*90
>       warp {spherical
>         orientation y
>         dist_exp 1
>       }
>     }
>   }
> }
>

Thank you, this is exactly what I was looking for. I did not know the warp
command, that was my problem.

>
> > Another question: I am using a bitmap obtained from a postscript file I
> > have,
> > because I did not find the way to use the PS directly. Is it possible?
> >
>
> No. The valid bitmap types are "gif | tga | iff | ppm | pgm | png | jpeg |
> tiff | sys".
> No vector graphics formats are supported.
>

A pitty. Maybe not many people would use it, I don't know, but for me it would
be useful!


Post a reply to this message

From: Chris B
Subject: Re: image spherical projection and postscript.
Date: 3 Feb 2008 10:57:28
Message: <47a5e468@news.povray.org>
"zeycus" <mig### [at] onocom> wrote in message 
news:web.47a5dc66a2a0ea67b5f201c20@news.povray.org...
> "Chris B" <nom### [at] nomailcom> wrote:
>> Use the 'once' keyword and scale in 'x'  to get a segment (or scale in 
>> 'y'
>> and translate in 'y' to get a ring around the middle of the sphere).
>>
>
> Thank you, this is exactly what I was looking for. I did not know the warp
> command, that was my problem.
>

Looking at the link Warp posted, I think you should be able to do the same 
with Map Type 1 and avoid the need for the Warp, but I've not tried that 
myself.

Regards,
Chris B.


Post a reply to this message

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