POV-Ray : Newsgroups : povray.newusers : image_map to tilted and rotated triangle centered and scaled : Re: image_map to tilted and rotated triangle centered and scaled Server Time
6 Jul 2022 19:36:42 EDT (-0400)
  Re: image_map to tilted and rotated triangle centered and scaled  
From: Alain Martel
Date: 28 Mar 2022 11:23:31
Message: <6241d2f3$1@news.povray.org>
Le 2022-03-27 à 22:18, Molly-J a écrit :
> I am going mad trying to project image maps onto polygons that are not in the
> x-y plane or plumb to the y axis. I have 20 equilateral triangles forming a
> typical D20 shape (regular icosahedron). I have the XYZ coordinates for the
> points so all I have to do is create each triangle using sets of the 32
> vertices. BUT . . . .
> 
> I cannot work out how to project the 20 image_map pigments properly. Image_map
> pigments only seem to work on polygons normal to the Z axis and left corner at
> 0,0 XY
> 
> The suggestion that I create each triangle at 0,0 and then translate/rotate them
> to the icosahedron would be just fine if i had those numbers. (I do not)
> 
> There must exist another way, as the current limitation is ludicrously
> un-useful. Everybody aplying pictures to polyhedra would have exactly the same
> problem.
> What am I missing?
> 
> Is it possible to translate the triangle by translating its individual points?
> That I might be able to do, but I can't work out how.
> 
> 
> The ultimate goal is a Dymaxion type world map on an Icosahedron.
> 

In your case, it may be OK to use the spherical mapping for your 
image_map, making sure that the isocahedron is modelled centred at the 
origin. For that you need a single image showing every faces. Ideally, 
that image will have a 2:1 aspect ratio.

Add «map_type 1» at the beginning of the image_map statement. There will 
be some distortion, but, in this case, it'll be minimal.

Another option is to use UV mapping. For that, you need to declare your 
icosahedron as a mesh object.

If that's not an option, like you have individual images for each faces, 
you need to create each triangles at the origin parallel to the X-Y 
plane, rotate them correctly, then translate them to their final location.


Post a reply to this message

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