|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Hi,
I can create sharp cornered objects using prism function, such as the case of
the
cabinet in the picture.
But creating the front door and the top/bottom panels is problematic for me
cause I dont know how to "bend/curve" the path for a prism.
the code I use for the case is below
//top
cls.WriteLine("union{prism {linear_spline 0,75,7");
cls.WriteLine("<" + s1x + "," + s1y + ">, <" + s2x + "," + s2y + ">, <" + s3x +
"," + s3y + ">, <" + s4x + "," + s4y + ">, <" + s5x + "," + s5y + ">, <" + s6x +
"," + s6y + ">, <" + s1x + "," + s1y + ">");
cls.WriteLine(color + "} finish {phong 1 ambient 0.6 reflection 0}}");
cls.WriteLine("rotate<-0,0,180> ");
cls.WriteLine("translate<0," + Height + ",0>}");
Does it have something to do with linear_spline , can you give me a simple
sample for creating this door and the top panel as prism object or another
better object?
I can draw this shape from top down view in C# gdi+, but in povray I dont know
which arguments to feed into which function.
http://www.kitchendesigned.com/public_download/curved_cabinet.jpg
thank you very much for all your help
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
optima wrote:
> Hi,
>
> I can create sharp cornered objects using prism function, such as the case of
> the
> cabinet in the picture.
>
> But creating the front door and the top/bottom panels is problematic for me
> cause I dont know how to "bend/curve" the path for a prism.
> ...
> Does it have something to do with linear_spline , can you give me a simple
> sample for creating this door and the top panel as prism object or another
> better object?
>
> I can draw this shape from top down view in C# gdi+, but in povray I dont know
> which arguments to feed into which function.
>
> thank you very much for all your help
Can you provide a link to a sketch of the most complex piece you will
have to make? I've been working on a rounded prism object which may suit
your needs. With it, you describe a series of points making up a linear
spline and can add rounding to each point, allowing for more complex
shapes. The object can be beveled, and can also handle sharp corners. It
can easily produce the object you posted. I'm almost done with it; I
just need to provide a few sample scenes.
Sam
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Hi,
>
> I can create sharp cornered objects using prism function, such as the case of
> the
> cabinet in the picture.
>
> But creating the front door and the top/bottom panels is problematic for me
> cause I dont know how to "bend/curve" the path for a prism.
>
> the code I use for the case is below
> //top
> cls.WriteLine("union{prism {linear_spline 0,75,7");
> cls.WriteLine("<" + s1x + "," + s1y +">,<" + s2x + "," + s2y +">,<" + s3x +
> "," + s3y +">,<" + s4x + "," + s4y +">,<" + s5x + "," + s5y +">,<" + s6x +
> "," + s6y +">,<" + s1x + "," + s1y +">");
>
> cls.WriteLine(color + "} finish {phong 1 ambient 0.6 reflection 0}}");
> cls.WriteLine("rotate<-0,0,180> ");
> cls.WriteLine("translate<0," + Height + ",0>}");
>
> Does it have something to do with linear_spline , can you give me a simple
> sample for creating this door and the top panel as prism object or another
> better object?
>
> I can draw this shape from top down view in C# gdi+, but in povray I dont know
> which arguments to feed into which function.
>
>
>
> http://www.kitchendesigned.com/public_download/curved_cabinet.jpg
>
> thank you very much for all your help
>
>
>
You may try with the bezier_spline. With that kind of spline, each
segment is defined by 4 points. The first and last are the actual start
and end points, while the second and third are controll points that
define the direction of the segment at the end points and what you can
imagine as a stiffness factor that depend on the length of the line from
the first and second points and third and forth ones.
You can have something like this:
prism{bezier_spline 0,0.1, 20
<0,0>,<0,1>,<0,3>,<0,4>, // straight
<0,4><1,4><3,4><4,4> // straight
<4,4><4,3.5><4,3.5><4,3> // straight
<4,3>,<3.4,2.95>,<0.9,3.5>,<1,0>, // curve
<1,0>,<0,0>,<1,0>,<0,0> // straight
pigment{rgb 1}
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Sam,
thank you for answering, the first link picture is the most complex piece I need
to produce(almost). But remember it's a cabinet so it has the inside-curved door
and the case and the top and bottom covers to make it a complete cabinet.
I can build the case sides from simple box objects.
I build the top-bottom panels if it's not curved but straight line from prism
see picture
http://www.kitchendesigned.com/public_download/cabinet.jpg
the problem is when I need to follow curved lines for a prism.
the measurements of the sample cabinet is shown on the picture.
the top-down view of the cabinet shows sides.
side 1 = 90 cm
side 2 = 90 cm
side 3 = 60 cm
side 4 = 60 cm
How can I produce curved and straight lines in a single prism object for this
cabinet's top-bottom part? Of course same algorithm will be used for a shelf
too.
I appreciate any help in this matter, I am really stuck when it comes to things
other than straight lines in anything.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
optima wrote:
> the problem is when I need to follow curved lines for a prism.
>
> How can I produce curved and straight lines in a single prism object for this
> cabinet's top-bottom part? Of course same algorithm will be used for a shelf
> too.
>
> I appreciate any help in this matter, I am really stuck when it comes to things
> other than straight lines in anything.
My include file will make things like that easier.
Here's a quick example:
http://www.caltel.com/~abenge/curved.png
And the points used to make it:
#declare pts =
array[1]{
array[6]{
<-1, -1, 0>,
<-1, 1, 0>,
<.3, 1, 0>,
<.3, .3, .5>, // rounded portion
<1, .3, 0>,
<1, -1, 0>
}
}
curves. Hopefully, the code will be finished soon. I can keep you
updated if you would like.
Sam
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
optima wrote:
> I build the top-bottom panels if it's not curved but straight line from prism
> see picture
> http://www.kitchendesigned.com/public_download/cabinet.jpg
Actually, the simplest solution to your problem may be to cut a
cylindrical section out of your linear_spline prism using a difference
statement.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Sam and Alain,
thank you, can Sam send me / post here the complete code for the sample picture.
How about the door? Yes please keep me posted on your work. As long as I use
povray (maybe 5-10 years more if they dont update it) I would like to hear from
anyone involved with it.
jes### [at] yahoocom
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Alain, I like your sample it seems like the answer I'm looking for but I am
still short of fully grasping spline_beziers.
Can you show your prism sample on this jpg picture
http://www.kitchendesigned.com/public_download/bezier_sample.jpg
I need to see which parameters correspond to which sides of cabinet, I need to
see them visually on the bezier_sample.jpg, then I can fully understand it.
If you could just replace prism arguments with S1_x, ... etc. And show on the
picture which side is which, I would be grateful. jes### [at] yahoocom
My project is really stuck on this bezier issue.
#declare S1_x = 0;
#declare S1_y = 0;
#declare S2_x = 0;
#declare S2_y = 0;
#declare S3_x = 0;
#declare S3_y = 0;
#declare S4_x = 0;
#declare S4_y = 0;
#declare S5_x = 0;
#declare S5_y = 0;
prism{bezier_spline 0,0.1, 20
<S1_x,S1_y>,<0,1>,<0,3>,<0,4>, // straight
<0,4><1,4><3,4><4,4> // straight
<4,4><4,3.5><4,3.5><4,3> // straight
<4,3>,<3.0,0.95>,<0.9,3.5>,<1,0>, // curve
<1,0>,<0,0>,<1,0>,<0,0> // straight
pigment{rgb 1}
}
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
"optima" <jes### [at] yahoocom> wrote:
.....
> I need to see which parameters correspond to which sides of cabinet, I need to
> see them visually on the bezier_sample.jpg, then I can fully understand it.
.....
I've posted an example picture of a prism (bezier_spline) in the
povray.binaries.images news group. It shows both straight and curved sections
and the pov code it is based on.
Hope this helps.
Stephen S
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
> Alain, I like your sample it seems like the answer I'm looking for but I am
> still short of fully grasping spline_beziers.
>
> Can you show your prism sample on this jpg picture
>
> http://www.kitchendesigned.com/public_download/bezier_sample.jpg
>
> I need to see which parameters correspond to which sides of cabinet, I need to
> see them visually on the bezier_sample.jpg, then I can fully understand it.
> If you could just replace prism arguments with S1_x, ... etc. And show on the
> picture which side is which, I would be grateful. jes### [at] yahoocom
> My project is really stuck on this bezier issue.
#declare S1_x = 0;
#declare S1_y = 0;
//Bottom left on the image
#declare S2_x = 0;
#declare S2_y = 4;
//Top left
#declare S3_x = 4;
#declare S3_y = 4;
//Top right
#declare S4_x = 4;
#declare S4_y = 3;
//Start of curved part on the right
#declare S5_x = 1;
#declare S5_y = 0;
//End of curved part on the bottom
prism{bezier_spline 0,0.1, 20
<S1_x,S1_y>,<0,1>,<0,3>,<S2_x,S2_y>, // straight
<S2_x,S2_y><1,4><3,4><S3_x,S3_y> // straight
<S3_x,S3_y><4,3.5><4,3.5><S4_x,S4_y> // straight
<S4_x,S4_y>,<3.0,0.95>,<0.9,3.5>,<S5_x,S5_y>, // curve
<S5_x,S5_y>,<0,0>,<1,0>,<S1_x,S1_y> // straight
pigment{rgb 1}
}
The last point = the first to close the prism.
The last point of each group of 4 is also the first point of the next group.
The total number of points is always a multiple of 4.
In the sample, the prism's thickness is 0.1 unit, good for a shelve.
It's acceptable, for the straight parts, to have something like this:
<S1_x,S1_y>,<S2_x,S2_y>,<S1_x,S1_y>,<S2_x,S2_y>
Alain
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
|
|