|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi
I'm trying to map an image on to the 'end' of a prism but no matter what
I do it always maps onto the 'side' of it. Basically I'm trying to
create a 7 sided coin with an image mapped on the 'heads' and 'tails'
side. This is what I've tried:
prism {
linear_sweep
linear_spline
-0.9, 0.9, 7,
< 0.623, 0>, < 0, 0.782>, < 0.223, 1.757>, < 1.123, 2.19>, < 2.023,
1.757>, <2.246, 0.782>, <1.623, 0>
pigment{
image_map {
gif "50p_tails.gif"
once
}
scale <2.46, 2, 0>
}
}
Any ideas?
Mike Varley
mik### [at] nacstockacuk
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Yes, this will happen. Image maps will move forever through the z axis, the
once option only applies to the x-y plane. In order to place an image map on
the other side, you need to make two objects with the same height and width
but with half the depth, then on the second one place the second image but
be sure to rotate it correctly or it will appear backwards.
Josh English
eng### [at] spiritonecom
Mike Varley wrote:
> Hi
>
> I'm trying to map an image on to the 'end' of a prism but no matter what
> I do it always maps onto the 'side' of it. Basically I'm trying to
> create a 7 sided coin with an image mapped on the 'heads' and 'tails'
> side. This is what I've tried:
>
> prism {
> linear_sweep
> linear_spline
> -0.9, 0.9, 7,
> < 0.623, 0>, < 0, 0.782>, < 0.223, 1.757>, < 1.123, 2.19>, < 2.023,
> 1.757>, <2.246, 0.782>, <1.623, 0>
>
> pigment{
> image_map {
> gif "50p_tails.gif"
> once
> }
> scale <2.46, 2, 0>
> }
> }
>
> Any ideas?
>
> Mike Varley
> mik### [at] nacstockacuk
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Thu, 28 Jan 1999 13:17:42 -0800, Josh English <eng### [at] spiritonecom> wrote:
>Yes, this will happen. Image maps will move forever through the z axis, the
>once option only applies to the x-y plane. In order to place an image map on
>the other side, you need to make two objects with the same height and width
>but with half the depth, then on the second one place the second image but
>be sure to rotate it correctly or it will appear backwards.
You might also try some trickery with the radial pattern:
#macro DoubleImage( front, back )
radial
pigment_map {
[.5 front]
[.5 back rotate 180*y]
}
#end
#declare f=pigment{image_map{ sys "heads.bmp" once } translate -.5}
#declare b=pigment{image_map{ sys "tails.bmp" once } translate -.5}
#declare coin=cylinder {
-.1*z,.1*z,1
texture{pigment {color rgb 1}}
texture {pigment {DoubleImage(f,b)}}
}
If you look at the front (-z) side of this simple round coin, you'll see
the heads image. Look at the back (z) side and you see the tails image.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
>
> Hi
>
> I'm trying to map an image on to the 'end' of a prism but no matter what
> I do it always maps onto the 'side' of it. Basically I'm trying to
> create a 7 sided coin with an image mapped on the 'heads' and 'tails'
> side. This is what I've tried:
>
Image maps project the image onto the x,y plane while prisms are created
in the x,z plane,
just rotate your prism around the x axis
> prism {
> linear_sweep
> linear_spline
> -0.9, 0.9, 7,
> < 0.623, 0>, < 0, 0.782>, < 0.223, 1.757>, < 1.123, 2.19>, < 2.023,
> 1.757>, <2.246, 0.782>, <1.623, 0>
rotate x*-90 // ***** rotation added ********
>
> pigment{
> image_map {
> gif "50p_tails.gif"
> once
> }
> scale <2.46, 2, 0>
> }
> }
>
> Any ideas?
>
> Mike Varley
> mik### [at] nacstockacuk
Cheers, PoD.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Ok, so I was still thinking brute force... that is a great solution, kudos for
clever thinking.
I am working on a web site that collects this kind of specific questions, would you
mind if I used this solution for it (giving you full credit, of course)
Josh English
eng### [at] spiritonecom
Ron Parker wrote:
> On Thu, 28 Jan 1999 13:17:42 -0800, Josh English <eng### [at] spiritonecom> wrote:
> >Yes, this will happen. Image maps will move forever through the z axis, the
> >once option only applies to the x-y plane. In order to place an image map on
> >the other side, you need to make two objects with the same height and width
> >but with half the depth, then on the second one place the second image but
> >be sure to rotate it correctly or it will appear backwards.
>
> You might also try some trickery with the radial pattern:
>
> #macro DoubleImage( front, back )
> radial
> pigment_map {
> [.5 front]
> [.5 back rotate 180*y]
> }
> #end
>
> #declare f=pigment{image_map{ sys "heads.bmp" once } translate -.5}
> #declare b=pigment{image_map{ sys "tails.bmp" once } translate -.5}
>
> #declare coin=cylinder {
> -.1*z,.1*z,1
> texture{pigment {color rgb 1}}
> texture {pigment {DoubleImage(f,b)}}
> }
>
> If you look at the front (-z) side of this simple round coin, you'll see
> the heads image. Look at the back (z) side and you see the tails image.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Fri, 29 Jan 1999 09:04:35 -0800, Josh English <eng### [at] spiritonecom> wrote:
>Ok, so I was still thinking brute force... that is a great solution, kudos for
>clever thinking.
>
>I am working on a web site that collects this kind of specific questions, would you
>mind if I used this solution for it (giving you full credit, of course)
You may, but you'll also want to give credit to Chris Colefax for his
contribution. His version was posted both here (in povray.newusers)
and in CGRR, I think, and is basically the same idea but maps a
different texture on each face of a cube. (And is thus vastly more
complex.)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|