POV-Ray : Newsgroups : povray.binaries.images : uv_mapping for cylinder, disc, cone & lemon : uv_mapping for cylinder, disc, cone & lemon Server Time
20 Apr 2024 03:36:56 EDT (-0400)
  uv_mapping for cylinder, disc, cone & lemon  
From: Le Forgeron
Date: 3 Sep 2018 15:12:27
Message: <5b8d879b@news.povray.org>
user control is achieved by adding "uv_mapping direction" in cylinder,
disc, cone and lemon

code available at
https://github.com/LeForgeron/povray/commit/83a269c227ab08e6e426670f30ed18a524360b17

> https://github.com/LeForgeron/povray/commit/83a269c227ab08e6e426670f30ed18a524360b17

first point of cone is always uv(0,0), even if the internal code later
performs an inversion.

Disc center or inner circle is v(0), outside is v(1)



cone { -y * 0.5, 0.5, 0.5 * y, 0.25  uv_mapping x texture { Verso }
transform{ Trans }  translate VS* y + 6 * x }

cylinder { -y * 0.5, 0.5 * y, 0.5 uv_mapping x  texture { Verso }
transform { Trans } translate 6 * x }

lemon
{
  -0.5 * y, .5, 0.5 * y, .25, 1.5 uv_mapping x texture
  {
    Verso
  } transform { Trans } translate - VS* y + 6 * x
}

ovus { 0.5, 0.25 distance 1 radius 2.5 texture { Verso }
transform { Trans } translate - VS * y}

disc { 0, -y, 1, 0.125 uv_mapping x texture { Verso } transform { Trans
} translate +VS*y }

sphere { 0, 0.5 texture { Verso }  transform { Trans}  translate - VS* y
- 6 * x}

torus { 0.65, 0.25 texture { Verso }  transform { Trans } translate - 6 * x}

box{ -0.5, 0.5  texture { Verso } transform { Trans }  translate VS* y -
6 * x }

box { 0, <1, 1, 0> texture { Flat }  scale 3 translate - 3/2 * x - y }


Post a reply to this message


Attachments:
Download 'refimguvmapping.png' (347 KB)

Preview of image 'refimguvmapping.png'
refimguvmapping.png


 

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