POV-Ray : Newsgroups : povray.binaries.images : Bezier Lathe UV Mapping bug : Bezier Lathe UV Mapping bug Server Time
1 Aug 2024 08:22:10 EDT (-0400)
  Bezier Lathe UV Mapping bug  
From: Edouard Poor
Date: 21 Sep 2008 17:25:31
Message: <48d6bbcb@news.povray.org>
I'm finding that my bezier_spline lathes get uv_mapped pigments wrong - 
the y component is inverted inside each spline segment.

Attached is a picture, and the source, showing the problem (and that the 
other spline types, and sors, are unaffected).

Is this a known bug? I couldn't find any other references to it, but 
maybe my google-foo failed...

Cheers,
Edouard.



camera {
	perspective
	location < 0.0, 3, -6>
	right x * 1
	up y * image_height / image_width
	angle 45
	look_at < 0, 0.5, 0>
}

light_source {
	< -20, 15, -15>
	rgb 1
}

plane {
	<0.0, 1.0, 0.0>, 0.0
	pigment { checker rgb 1, rgb 0.8 }
}

#declare linear_lathe =
lathe {
	linear_spline
	7,
	<0.00000, 0.00000>,	<0.25000, 0.06699>,
	<0.43301, 0.25000>,	<0.50000, 0.50000>,
	<0.43301, 0.75000>,	<0.25000, 0.93301>,
	<0.00000, 1.00000>
}


#declare quadratic_lathe =
lathe {
	quadratic_spline
	8,
	<0.00000, 0.00000>,	<0.00000, 0.00000>,
	<0.25000, 0.06699>,	<0.43301, 0.25000>,
	<0.50000, 0.50000>,	<0.43301, 0.75000>,
	<0.25000, 0.93301>,	<0.00000, 1.00000>
}


#declare cubic_lathe =
lathe {
	cubic_spline
	9,
	<0.00000, 0.00000>,	<0.00000, 0.00000>,
	<0.25000, 0.06699>,	<0.43301, 0.25000>,
	<0.50000, 0.50000>,	<0.43301, 0.75000>,
	<0.25000, 0.93301>,	<0.00000, 1.00000>,
	<0.00000, 1.00000>
}


#declare bezier_lathe =
lathe {
	bezier_spline
	24,
	<0.00000, 0.00000>,	<0.08682, 0.00760>,
	<0.17101, 0.03015>,	<0.25000, 0.06699>,
	<0.25000, 0.06699>,	<0.32139, 0.11698>,
	<0.38302, 0.17861>,	<0.43301, 0.25000>,
	<0.43301, 0.25000>, 	<0.46985, 0.32899>,
	<0.49240, 0.41318>,	<0.50000, 0.50000>,
	<0.50000, 0.50000>,	<0.49240, 0.58682>,
	<0.46985, 0.67101>,	<0.43301, 0.75000>,
	<0.43301, 0.75000>,	<0.38302, 0.82139>,
	<0.32139, 0.88302>,	<0.25000, 0.93301>,
	<0.25000, 0.93301>,	<0.17101, 0.96985>,
	<0.08682, 0.99240>,	<0.00000, 1.00000>
}


#declare uv_pigment =
pigment {
	uv_mapping
	gradient y
	color_map {
		[ 0.0	rgb <1,0,0> ]
		[ 0.333	rgb <0,0,1> ]
		[ 0.666	rgb <0,1,0> ]
		[ 1.0	rgb <1,0,0> ]
	}
}

lathe {
	linear_lathe
	pigment { uv_pigment }
	translate x*-1.8
}

lathe {
	quadratic_lathe
	pigment { uv_pigment }
	translate x*-0.6
}

lathe {
	cubic_lathe
	pigment { uv_pigment }
	translate x*0.6
}

lathe {
	bezier_lathe
	pigment { uv_pigment }
	translate x*1.8
}

sor {
	9
	<0.00000, 0.00000>,	<0.00000, 0.00000>,
	<0.25000, 0.06699>,	<0.43301, 0.25000>,
	<0.50000, 0.50000>,	<0.43301, 0.75000>,
	<0.25000, 0.93301>,	<0.00000, 1.00000>,
	<0.00000, 1.00000>
	pigment { uv_pigment }
	translate z*1.8
}


Post a reply to this message


Attachments:
Download 'uv_lathe_bug.jpg' (39 KB)

Preview of image 'uv_lathe_bug.jpg'
uv_lathe_bug.jpg


 

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