POV-Ray : Newsgroups : povray.advanced-users : Bezier spline deformation : Re: Bezier spline deformation Server Time 7 Dec 2023 08:49:04 EST (-0500)
 Re: Bezier spline deformation
 From: ingo Date: 15 Mar 2023 07:30:00 Message:
```
{
"@context": "https://schema.org",
"@type": "DiscussionForumPosting",
"@id": "#web.6411abfd122e7e3a17bac71e8ffb8ce3%40news.povray.org",
"dateCreated": "2023-03-15T11:30:00+00:00",
"datePublished": "2023-03-15T11:30:00+00:00",
"author": {
"@type": "Person",
"name": "ingo"
}
}
"ingo" <nomail@nomail> wrote:
> yesbird <sya### [at] gmailcom> wrote:
> > On 15/03/2023 10:47, yesbird wrote:
>
> Cubic splines are hard to compare. What cubic is used by whom?

Cubic B-spline using my curve macros

---%<------%<------%<---

#version 3.7;

#global_settings{ assumed_gamma 1.0 }
#default{ finish{ ambient 0.1 diffuse 0.9 emission 0}}

#declare Bspl3 = CIbspline3(
array[7]{
<0.000000, -1.000000,0>
<1.500000, 0.000000,0>
<0.000000, 1.000000,0>
<-1.500000, 0.000000,0>
<0.000000, -1.000000,0>
<1.500000, 0.000000,0>
<0.000000, 1.000000,0>
}
)

//get the points on the curve
#for(T, 0, 1, 0.005)
sphere{CIget(Bspl3, T), 0.02 pigment{rgb 1}}
#end

//control points
sphere{Bspl3[1][0] 0.03 pigment{rgb <1,0,0>}}
#for(i, 1, dimension_size(Bspl3[1],1) - 1)
sphere{Bspl3[1][i] 0.03 pigment{rgb <1,0,0>}}
cylinder{Bspl3[1][i-1], Bspl3[1][i], 0.01 pigment{rgb <1,0,0>}}
#end

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

light_source{<0, 0,-3000> color rgb 1}

---%,------%<------%<---
```

Attachments: