POV-Ray : Newsgroups : povray.programming : Adding a new object : Re: Adding a new object Server Time
28 Jul 2024 14:21:33 EDT (-0400)
  Re: Adding a new object  
From: Warp
Date: 10 Aug 2002 10:30:18
Message: <3d55237a@news.povray.org>
By the way, this scene demonstrates the problem with uv-mapping when
using two triangles to make a quadrilateral (AFAIK there's no way to
avoid this effect):

camera { location -z*4 look_at 0 }
mesh2
{ vertex_vectors { 4, <-2,-1.5,0>, <2,-1.5,0>, <1,1.5,0>, <-1,1.5,0> }
  uv_vectors { 4, <0,0>, <1,0>, <1,1>, <0,1> }
  face_indices { 2, <0,1,2>, <0,2,3> }
  uv_mapping
  texture
  { pigment { gradient x color_map { [0 rgb 0][1 rgb 1] } scale .1 }
    finish { ambient 1 }
  }
}

  A true quadrilateral could interpolate the texture along the whole
quadrilateral instead of the two separate triangles, giving a more logical
result.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

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