POV-Ray : Newsgroups : povray.text.scene-files : 3-sided bezier Server Time
30 Jun 2024 04:28:50 EDT (-0400)
  3-sided bezier (Message 1 to 5 of 5)  
From: Micha Riser
Subject: 3-sided bezier
Date: 21 Aug 2002 05:09:57
Message: <3d6358e4@news.povray.org>
See p.advanced-users.

-- 
http://objects.povworld.org - the POV-Ray Objects Collection


Post a reply to this message


Attachments:
Download 'us-ascii' (3 KB) Download 'us-ascii' (2 KB)

From: Micha Riser
Subject: Re: 3-sided bezier, now degree 3
Date: 21 Aug 2002 17:09:47
Message: <3d64019a@news.povray.org>
Micha Riser wrote:

> See p.advanced-users.
> 

-- 
http://objects.povworld.org - the POV-Ray Objects Collection


Post a reply to this message


Attachments:
Download 'us-ascii' (6 KB)

From: Rune
Subject: Re: 3-sided bezier, now degree 3
Date: 21 Aug 2002 19:12:09
Message: <3d641e49@news.povray.org>
Here's the file with my own sample scene included.

By the way, shouldn't source code in attached text files go in
povray.binaries.scene-files ?

Rune
--
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com (updated July 12)
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message


Attachments:
Download 'bezier_n3_m3_mesh_smooth_b.pov.txt' (7 KB)

From: Ken
Subject: Re: 3-sided bezier, now degree 3
Date: 21 Aug 2002 21:08:21
Message: <3D643A28.541BA7DE@pacbell.net>
Rune wrote:

> By the way, shouldn't source code in attached text files go in
> povray.binaries.scene-files ?

Yes, it should.

-- 
Ken Tyler


Post a reply to this message

From: ingo
Subject: Re: 3-sided bezier
Date: 27 Aug 2002 16:28:33
Message: <Xns9277E55796F3Dseed7@povray.org>
> See p.advanced-users.
> Message-ID: <3d6bd332$1@news.povray.org>

Needs param.inc and makemesh.inc from 
http://members.home.nl/seedseven/
direct link:
http://members.home.nl/seedseven/MMMM.zip

---%<------%<---
#version 3.5;

#include "colors.inc"
#include "param.inc"

global_settings {
  assumed_gamma 1.0
}

#declare w=function(u,v){
	min(1, (1-u-v)/max( 1-2*u*v,0.001 ) )
}

#macro bezier3(A,B,C,D,E,F,G)
	#local Ax=A.x; #local Ay=A.y; #local Az=A.z;
	#local Bx=B.x; #local By=B.y; #local Bz=B.z;
	#local Cx=C.x; #local Cy=C.y; #local Cz=C.z;
	#local Dx=D.x; #local Dy=D.y; #local Dz=D.z;
	#local Ex=E.x; #local Ey=E.y; #local Ez=E.z;
	#local Fx=F.x; #local Fy=F.y; #local Fz=F.z;
	#local Gx=G.x; #local Gy=G.y; #local Gz=G.z;

  object {	
    Parametric(
      function(u,v) {                  //functions from  Micha Riser
        u*u*(1-2*u*w(u,v) )*Ax
        + 2*u*v*(1-w(u,v) )*Bx 
        + v*v*(1-2*w(u,v)*u)*Cx
        + 2*v*w(u,v)*(1-u)*Dx
        + pow(w(u,v),2)*(1-2*u*v)*Ex
        + 2*u*w(u,v)*(1-v)*Fx
        + 4*u*v*w(u,v)*Gx
      },
      function(u,v) {
        u*u*(1-2*u*w(u,v) )*Ay 
      	+ 2*u*v*(1-w(u,v) )*By 
      	+ v*v*(1-2*w(u,v)*u)*Cy
      	+ 2*v*w(u,v)*(1-u)*Dy
      	+ pow(w(u,v),2)*(1-2*u*v)*Ey
      	+ 2*u*w(u,v)*(1-v)*Fy
      	+ 4*u*v*w(u,v)*Gy
      },
      function(u,v) {
        u*u*(1-2*u*w(u,v) )*Az 
      	+ 2*u*v*(1-w(u,v) )*Bz 
      	+ v*v*(1-2*w(u,v)*u)*Cz
      	+ 2*v*w(u,v)*(1-u)*Dz
      	+ pow(w(u,v),2)*(1-2*u*v)*Ez
      	+ 2*u*w(u,v)*(1-v)*Fz
      	+ 4*u*v*w(u,v)*Gz
      }

	 <0,0>,<1,1>
      50, 50,""
    )
  }
#end

object {
  bezier3( 
    <0,0,0>,<0.5,1,0>,<1,0,0>,
    <1,1,0.4>,<1,0,1>,
		<0.5,1,0.5>,<0.7,1.5,0.3>
	)
	texture {
	  uv_mapping
	  pigment {checker scale 0.1}
	}
}
	
light_source{<0,5,0> rgb 1}

camera{
  location <0,4,-1>
  look_at 0.5
  angle 40
}

plane{y,0 pigment{rgb <0,0,1>}}	
---%<------%<---


Post a reply to this message

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