|
 |
On Thu, 12 Jul 2001 11:31:42 -0400, Bill DeWitt wrote:
> I need a bicycle model to do an image for a friend's bicycle club
>(non-profit). Does anyone have one they can share?
If Dan Connelly is still around, he might be able to help you out. The
email address on his web page is djc### [at] flash net, and you can see his
bike at http://www.flash.net/~djconnel/POV/bike.jpg but unless I'm mistaken,
he hasn't posted here in a very long time.
--
#macro R(L P)sphere{L __}cylinder{L P __}#end#macro P(_1)union{R(z+_ z)R(-z _-z)
R(_-z*3_+z)torus{1__ clipped_by{plane{_ 0}}}translate z+_1}#end#macro S(_)9-(_1-
_)*(_1-_)#end#macro Z(_1 _ __)union{P(_)P(-_)R(y-z-1_)translate.1*_1-y*8pigment{
rgb<S(7)S(5)S(3)>}}#if(_1)Z(_1-__,_,__)#end#end Z(10x*-2,.2)camera{rotate x*90}
Post a reply to this message
|
 |
|
 |
"Bill DeWitt" <bde### [at] cfl rr com> wrote in message
news:3b504eff@news.povray.org...
>
> Giving up on most of the available models I am attempting to model a
> bicycle in MegaPov myself using isosurfaces for the frame. Unfortunately,
my
> idea about blobbing cylinders is not working too well, because when you
> create a simple cylinder at an angle, it is somewhat flattened in one
> direction.
>
> Is there a good way to rotate a function in isosurfaces before you
blob
> it?
Sorry, here is what I am using now... I suspect I will need to make my
cylinders differently so that their end circles are tilted correctly.
#declare R = 0.25;
#declare C1 = function { x*x + z*z - R*R }
#declare C2 = function { y*y + z*z - R*R }
isosurface {
function { C1(x+y,y,z)
* C2(x,y,z)
- 0.001
}
method 1
accuracy 0.001
contained_by{sphere{0,3}}
pigment {rgb .9}
finish { ambient 0.25 }
}
Post a reply to this message
|
 |
|
 |
Bill DeWitt wrote:
>
> Giving up on most of the available models I am attempting to
> model a bicycle in MegaPov myself using isosurfaces for the frame.
> Unfortunately, my idea about blobbing cylinders is not working too
> well, because when you create a simple cylinder at an angle, it
> is somewhat flattened in one direction.
>
> Is there a good way to rotate a function in isosurfaces before
> you blob it?
Hello Bill,
Making the bicycle frame with an isosurface
is not an easy task, but the code below may
give you some hints.
(Note that I'm not sure if the possibility
to treat functions like I do below was
provided intentionally by the authors of
MegaPOV.)
Best regards,
--
Tor Olav Kristensen
mailto:tor### [at] hotmail com
http://hjem.sol.no/t-o-k
http://www.crosswinds.net/~tok
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =
// Copyright 2001 by Tor Olav Kristensen
// mailto:tor### [at] hotmail com
// http://www.crosswinds.net/~tok
// ===== 1 ======= 2 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =
#version unofficial MegaPov 0.7;
#include "colors.inc"
// ===== 1 ======= 3 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =
#macro XYZrotFunction(Xrot, Yrot, Zrot)
function {
Object(
(x*cos(Zrot) - y*sin(Zrot))*cos(Yrot) + z*sin(Yrot),
(x*sin(Zrot) + y*cos(Zrot))*cos(Xrot) +
(( x*cos(Zrot) - y*sin(Zrot))*sin(Yrot) - z*cos(Yrot))*sin(Xrot),
(x*sin(Zrot) + y*cos(Zrot))*sin(Xrot) +
((-x*cos(Zrot) + y*sin(Zrot))*sin(Yrot) + z*cos(Yrot))*cos(Xrot)
)
}
#end // macro XrotFunction
// ===== 1 ======= 3 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =
#declare Sphere = function { sqrt(x^2 + y^2 + z^2) }
#declare RR = 0.25;
//#declare CylinderX = function { Sphere(0, y, z) - RR }
#declare CylinderY = function { Sphere(x, 0, z) - RR }
//#declare CylinderZ = function { Sphere(x, y, 0) - RR }
// ===== 1 ======= 3 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =
#declare Object = function { CylinderY(x, y, z) }
#declare A = pi/4;
#declare RotObject1 = XYZrotFunction(-A, 0, 0)
#declare RotObject2 = XYZrotFunction( 0, 0, 0)
#declare RotObject3 = XYZrotFunction( 0, 0, A)
// ===== 1 ======= 3 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =
#declare BlobbingFunction1 =
function {
RotObject1(x, y, z)*
RotObject2(x, y, z)*
RotObject3(x, y, z)
-0.001
}
/*
#declare Thr = 1/10000;
#declare BlobbingFunction2 =
function {
1
-Thr^RotObject1(x, y, z)
-Thr^RotObject2(x, y, z)
-Thr^RotObject3(x, y, z)
}
*/
isosurface {
function {
BlobbingFunction1(x, y, z)
}
method 2
max_gradient 10
// accuracy 0.001
contained_by { sphere { <0, 0, 0>, 3 } }
pigment { color White }
finish { ambient 0.25 }
}
// ===== 1 ======= 3 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =
light_source {
<10, 1, 0>*10
color White
shadowless
}
background { color Blue/2 }
camera {
location <2, 3, -3>*2
look_at <0, 0, 0>
}
// ===== 1 ======= 3 ======= 3 ======= 4 ======= 5 ======= 6 ======= 7 =
Post a reply to this message
|
 |