POV-Ray : Newsgroups : povray.newusers : Trying to put a simple image on a cylinder's surface Server Time
24 Nov 2024 04:52:53 EST (-0500)
  Trying to put a simple image on a cylinder's surface (Message 1 to 3 of 3)  
From: Dave!
Subject: Trying to put a simple image on a cylinder's surface
Date: 1 Aug 2010 09:20:00
Message: <web.4c5573b0927177d058a2360d0@news.povray.org>
Haven't posted here in ages--please be gentle!


I'm trying to wrap a simple image onto the surface of a cylinder.  For various
reasons, I don't want to use image mapping and was hoping to do it with
intersecting solids.

The image is a sort of caution sign, an upright yellow triangle with a black
boarder and a black exclamation point inside.

I can create a flat version image very easily using a few triangle meshes and
disc objects, but I'm having trouble getting it to intersect with the cylider's
surface.

Does this make sense?  My gut feeling is that POV-Ray offers some dirt-simple
way to do this, but I have the impression that I'm missing something basic.


Any insight is appreciated!


Post a reply to this message

From: clipka
Subject: Re: Trying to put a simple image on a cylinder's surface
Date: 1 Aug 2010 12:48:24
Message: <4c55a558$1@news.povray.org>
Am 01.08.2010 15:16, schrieb Dave!:
> Haven't posted here in ages--please be gentle!
>
>
> I'm trying to wrap a simple image onto the surface of a cylinder.  For various
> reasons, I don't want to use image mapping and was hoping to do it with
> intersecting solids.
>
> The image is a sort of caution sign, an upright yellow triangle with a black
> boarder and a black exclamation point inside.
>
> I can create a flat version image very easily using a few triangle meshes and
> disc objects, but I'm having trouble getting it to intersect with the cylider's
> surface.
>
> Does this make sense?  My gut feeling is that POV-Ray offers some dirt-simple
> way to do this, but I have the impression that I'm missing something basic.

No surprise you have trouble intersecting your sign with the cylinder 
surface: You mention triangle meshes and disc objects; neither of these 
have any depth, so you can't intersect them with anything.

You need to give the sign a third dimension: Use cylinders instead of 
the disks, and linear_spline prisms instead of the triangle meshes. That 
should get you started.

Note that if you want the sign to cover a big portion of the cylinder, 
you may also run into problems with distortions. In that case, you might 
need to use a set of object patterns and apply a cylindrical warp.


Post a reply to this message

From: Dave!
Subject: Re: Trying to put a simple image on a cylinder's surface
Date: 1 Aug 2010 17:55:00
Message: <web.4c55ecd89bf243fc58a2360d0@news.povray.org>
clipka <ano### [at] anonymousorg> wrote:
> Am 01.08.2010 15:16, schrieb Dave!:
> > Haven't posted here in ages--please be gentle!
> >
> >
> > I'm trying to wrap a simple image onto the surface of a cylinder.  For various
> > reasons, I don't want to use image mapping and was hoping to do it with
> > intersecting solids.
> >
> > The image is a sort of caution sign, an upright yellow triangle with a black
> > boarder and a black exclamation point inside.
> >
> > I can create a flat version image very easily using a few triangle meshes and
> > disc objects, but I'm having trouble getting it to intersect with the cylider's
> > surface.
> >
> > Does this make sense?  My gut feeling is that POV-Ray offers some dirt-simple
> > way to do this, but I have the impression that I'm missing something basic.
>
> No surprise you have trouble intersecting your sign with the cylinder
> surface: You mention triangle meshes and disc objects; neither of these
> have any depth, so you can't intersect them with anything.

Well, I had *some* luck with inside_vector, but it caught both the front and
rear sides of the cylinder, so it was clear that I had more work to do there!

> You need to give the sign a third dimension: Use cylinders instead of
> the disks, and linear_spline prisms instead of the triangle meshes. That
> should get you started.

After posting, I had an idea about a union of several prisms and cylinders, and
this seems to be promising.  I'm having a bit of trouble getting it to break
exactly where I want it, but it feels like a more promising avenue than what I'd
been trying.

> Note that if you want the sign to cover a big portion of the cylinder,
> you may also run into problems with distortions. In that case, you might
> need to use a set of object patterns and apply a cylindrical warp.

Good point--I wasn't clear about that.  If the cylinder is, say, 10 units in
diameter, the sign will probably be about six units across, so there shouldn't
be too much distortion.


Thanks for your input!


Post a reply to this message

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