|
![](/i/fill.gif) |
"Basiclife" <nomail@nomail> wrote in message
news:web.455b03b9bef31fb5291c31dd0@news.povray.org...
>
> Another quick question if I may:
>
> In regards to mapping. Assume I had a checker board shape, I'd like the
> horizontal and vertical lines to act in the same way as lines of lat/long.
>
> Secondly, assume my image was 640x480 (for mapping, not the rendered
> output). How can I rig this so that it is stretched around the equator
> once
> - as a world map would have to be and covers 90% of the surface top to
> bottom?
>
> I'm assuming I add another pigment to specify colouring for those
> non-covered areas but I can work that out by myself.
>
> thank you in advance,
> Simon
>
Hi Simon,
I'm not sure that this is what you mean by a checker board shape as it's
more a grid, but the example below uses a simple straight line texture and
layers it over and over again. First it rotates it around the y axis by 10
degrees at a time, then it moves it vertically to cover the sphere, giving
an effect like the lines of latitude and longitude on a globe.
On your second question, I'd recommend just making an image the right size
in a graphics editor and pasting the 640x480 image into the middle of it. So
it the image covers 90% of what you need, you'd create a new image 640x532
and paste your 640x480 image into it, aligning it in the middle of the new,
larger image.
By the way, it's probably best to create a new thread on the newsgroup for
new questions because a lot of contributors may have stopped reading the old
thread when they saw the original question answered. By creating a new
thread you'll get a bigger audience and you're more likely to get your new
questions answered quicker, plus you may well get a broader selection of
different techniques and suggestions to choose from.
Regards,
Chris B.
#include "math.inc"
#declare YourObject = sphere {0,1}
#declare LineTexture = texture {
pigment {
gradient x
turbulence 0
color_map {
[0 rgbt <0,1,0,0>]
[0.001 rgbt <0,1,0,0>]
[0.001 rgbt <1,1,1,1>]
[1 rgbt <1,1,1,1>]
}
}
scale 10
}
#declare WireframeTexture = texture {LineTexture}
#local I = 0;
#while (I<180)
#declare WireframeTexture =
texture {WireframeTexture}
texture {LineTexture rotate y*I}
#local I = I + 10;
#end
#local I = -80;
#while (I<90)
#declare WireframeTexture =
texture {WireframeTexture}
texture {LineTexture rotate z*90 scale 2*y*(1-abs(sind(I)/1.1))
translate y*sind(I)}
#local I = I + 10;
#end
object {YourObject texture {WireframeTexture}}
camera {location <0,2,-2> look_at 0}
light_source { <100, 1000, -2000> color rgb 1}
Post a reply to this message
|
![](/i/fill.gif) |