POV-Ray : Newsgroups : povray.general : Curved prism Server Time: 19 Nov 2019 12:35:11 GMT
  Curved prism (Message 1 to 7 of 7)  
From: Kima
Subject: Curved prism
Date: 9 Sep 2019 03:15:00
Message: <web.5d75c2d16af53e9cecc0fada0@news.povray.org>
I wonder if there is a way to create a curved prim (not the edges, but its
surface).

Since prism already has an option of conic_sweep, the same principle may create
a curvature on its surface.

In conic_sweep, the size of prism decreases linearly in the y-axis. Instead of a
linear decrease, can we shrink the prism along the y-axis to form a semi-sphere
instead of a sharp cone (of conic_sweep)?


Post a reply to this message

From: William F Pokorny
Subject: Re: Curved prism
Date: 9 Sep 2019 12:32:12
Message: <5d76464c$1@news.povray.org>
On 9/8/19 11:11 PM, Kima wrote:
> I wonder if there is a way to create a curved prim (not the edges, but its
> surface).
> 
> Since prism already has an option of conic_sweep, the same principle may create
> a curvature on its surface.
> 
> In conic_sweep, the size of prism decreases linearly in the y-axis. Instead of a
> linear decrease, can we shrink the prism along the y-axis to form a semi-sphere
> instead of a sharp cone (of conic_sweep)?
> 
Nothing inbuilt(1,2).

Various partial methods have been created over the years to represent 
rounded prisms. Using the POV-Ray site search turns up:

http://news.povray.org/povray.binaries.images/thread/%3C3bd3afc7%241%40news.povray.org%3E/

for example.

I've played with isosurface, df3 based, sampling methods some of which 
can be found at:

  http://wiki.povray.org/content/User:Wfpokorny/DensityFile

and if you search of soft_object you'll turn up a method doing the 
sampling and df3 grid representation of the fly internally. Rounded 
sides and flat top/bottom opens up other partial solutions.

Sometimes folks model for rounded text in some other tool and export the 
mesh for use in POV-Ray. Tri/Quad patch mesh modeling with smoothing 
normals is itself a partial solution with trade offs though it's the one 
most supported out and about 3D graphics wise.

Bill P.

(1) - Not easy to do generically & on the fly at good performance. My 
personal thinking is with POV-Ray  it would be a 'better' direction to 
add some sort of any object to point cloud/mesh then mesh smoothing for 
such rounding / blobbing ability. Something done this way would be 
applicable to all objects and move us closer to mesh export-ability. 
Here too there have been a number of external tools/attempts over the 
years, but nothing has become 'the' method that I see. I have my own 
idea for a surface, random / curvature driven walk, approach I think 
might be better for maintaining hard / un-smoothed edges in the 
generated meshes that I've never gotten around to trying. (Aside: There 
is an ability to flip the normal directions via 2d point list direction 
- and so surface top/bottom/side textures - that exists with prism and 
lathe points lists which doesn't map to meshes.)

(2) - The current conic sweep is toward the x,z origin not some local 
'medial axis' inside the shape.


Post a reply to this message

From: kurtz le pirate
Subject: Re: Curved prism
Date: 9 Sep 2019 17:03:59
Message: <5d7685ff$1@news.povray.org>
On 09/09/2019 05:11, Kima wrote:
> I wonder if there is a way to create a curved prim (not the edges, but its
> surface).
> 
> Since prism already has an option of conic_sweep, the same principle may create
> a curvature on its surface.
> 
> In conic_sweep, the size of prism decreases linearly in the y-axis. Instead of a
> linear decrease, can we shrink the prism along the y-axis to form a semi-sphere
> instead of a sharp cone (of conic_sweep)?

A long time ago, Chris Colefax made macro for that. To download, there 
is this link on an archive: <http://www.oocities.org/ccolefax/bend.html>


-- 
Kurtz le pirate
Compagnie de la Banquise


Post a reply to this message

From: Bald Eagle
Subject: Re: Curved prism
Date: 9 Sep 2019 18:15:01
Message: <web.5d76958194470134eec112d0@news.povray.org>
kurtz le pirate <kur### [at] gmailcom> wrote:

> A long time ago, Chris Colefax made macro for that. To download, there
> is this link on an archive: <http://www.oocities.org/ccolefax/bend.html>

Yes - I remember that, and it was exactly what I had in mind when I was
furiously trying to get the box to bend over here:

http://news.povray.org/povray.binaries.images/thread/%3Cweb.5d4b7ce3a683fa3a4eec112d0%40news.povray.org%3E/


I think that for prisms that have any level of complexity, we'd need a method to
generate a "1-dimensional" version of the prism - the core of an offset curve -
or what are called "single line" fonts.

Then the edges of the prism could converge on that.


I'd say his best bet is probably straight CSG.
If he wants it to be smoothed, he'll need to make isosurface cylinders with
sphere-capped ends and blob them, or do the smooth_union thing.

But if there are going to be regions with different edge lengths, and therefore
give rise to cylinders of different radius, then he'd probably have to use
round-capped cones.

Tricksy it is, my Precious, but maybe this Hobbit has clever fingers...


Post a reply to this message

From: Le Forgeron
Subject: Re: Curved prism
Date: 10 Sep 2019 18:13:06
Message: <5d77e7b2@news.povray.org>
Le 09/09/2019 à 05:11, Kima a écrit :
> I wonder if there is a way to create a curved prim (not the edges, but its
> surface).
> 
> Since prism already has an option of conic_sweep, the same principle may create
> a curvature on its surface.
> 
> In conic_sweep, the size of prism decreases linearly in the y-axis. Instead of a
> linear decrease, can we shrink the prism along the y-axis to form a semi-sphere
> instead of a sharp cone (of conic_sweep)?
> 
> 
Are you expecting something like the attached picture ?
(faked so far, basic idea would use the curvature of a 2D curve to
'emboss' the line connecting two instances of the curve in parallele planes)

Beware of conic prism, it is biased toward the axis at the origin.


Post a reply to this message


Attachments:
Download 'cp.png' (147 KB)

Preview of image 'cp.png'
cp.png


 

From: Bald Eagle
Subject: Re: Curved prism
Date: 10 Sep 2019 18:30:01
Message: <web.5d77eae294470134eec112d0@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:

> Are you expecting something like the attached picture ?

If I read what he wanted correctly, he wants the top of the prism to not be
flat, but to be "domed".

So, the conic_sweep gives a linear convergence to a point - and I think what he
wants is a sort of radius*cos(y) convergence so that it's rounded /
hemispherical.


Post a reply to this message

From: Kima
Subject: Re: Curved prism
Date: 21 Sep 2019 22:15:01
Message: <web.5d86a0af9447013ecc0fada0@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:
> Le 09/09/2019 à 05:11, Kima a écrit :
> > I wonder if there is a way to create a curved prim (not the edges, but its
> > surface).
> >
> > Since prism already has an option of conic_sweep, the same principle may create
> > a curvature on its surface.
> >
> > In conic_sweep, the size of prism decreases linearly in the y-axis. Instead of a
> > linear decrease, can we shrink the prism along the y-axis to form a semi-sphere
> > instead of a sharp cone (of conic_sweep)?
> >
> >
> Are you expecting something like the attached picture ?
> (faked so far, basic idea would use the curvature of a 2D curve to
> 'emboss' the line connecting two instances of the curve in parallele planes)
>
> Beware of conic prism, it is biased toward the axis at the origin.

Not exactly, as I want a curvature on the top of prism rather than its edges,
but it can work, as we can increase the curvature of the rounded edges to cover
the top surface.

However, there is no established approach to create rounded prisms (to my
knowledge). I reckon your image is by roundedprism macro. The available macro
only works for basic prim shapes provided by an array or outer points.


Post a reply to this message

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