POV-Ray : Newsgroups : povray.general : Curved prism Server Time
21 Dec 2024 11:22:11 EST (-0500)
  Curved prism (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From: Kima
Subject: Curved prism
Date: 8 Sep 2019 23: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 08: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 13: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 14: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 14: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 14: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 18: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

From: Bald Eagle
Subject: Re: Curved prism
Date: 15 Apr 2020 22:55:00
Message: <web.5e97c81e9447013fb0b41570@news.povray.org>
I think this is what is wanted:

http://news.povray.org/povray.binaries.images/message/%3Cweb.5e97c744fd34edcfb0b41570%40news.povray.org%3E/#%3Cweb.5e97
c744fd34edcfb0b41570%40news.povray.org%3E


Post a reply to this message

From: Le Forgeron
Subject: Re: Curved prism
Date: 18 Apr 2020 12:39:20
Message: <5e9b2d38$1@news.povray.org>
Le 16/04/2020 à 04:51, Bald Eagle a écrit :
> 
> I think this is what is wanted:
> 
>
http://news.povray.org/povray.binaries.images/message/%3Cweb.5e97c744fd34edcfb0b41570%40news.povray.org%3E/#%3Cweb.5e97
> c744fd34edcfb0b41570%40news.povray.org%3E
> 

Ok, clearer with a picture, thanks.

So height on the curve is function of the distance to the prism's edge.

I foresee plenty of problems with concave prism.

It reminds me of pattern for color interpolation on polygon

http://wiki.povray.org/content/User:Le_Forgeron#Interpolation_for_polygon

> http://wiki.povray.org/content/User:Le_Forgeron#Interpolation_for_polygon

Sad point: I see no easy solver for ray computation.

Good point: defining a strength-field, using the distance to the nearest
edge of the prism, is possible. Then a non-linear function (like square
root or cube) can be used, to curve in space the shape of such isosurface.

Infernal point: the continuity of such field, when changing edge, is not
intrinsic, so excepted for regular polygon, it is probably doomed.


Post a reply to this message

From: Bald Eagle
Subject: Re: Curved prism
Date: 18 Apr 2020 16:25:01
Message: <web.5e9b61159447013fb0b41570@news.povray.org>
Le_Forgeron <jgr### [at] freefr> wrote:

> Ok, clearer with a picture, thanks.
> So height on the curve is function of the distance to the prism's edge.

Hmm.   Maybe.   In my mind, I formulate it as "width at any point above the base
prism is a function of the height above that base".
But it may work best either way depending upon the prism used...

> I foresee plenty of problems with concave prism.

Oh yes.  Maybe if there's a way to make a nice "center-line font" style offset
curve it would be possible to roughly estimate...


> Good point: defining a strength-field, using the distance to the nearest
> edge of the prism, is possible. Then a non-linear function (like square
> root or cube) can be used, to curve in space the shape of such isosurface.

I used a liner interpolation between the hexagonal "prism" (for the cap, it's an
isosurface) and a sphere.
The severe challenge would be defining an isosurface describing the prism
without resorting to using the "object as isosurface" by WFP.

> Infernal point: the continuity of such field, when changing edge, is not
> intrinsic, so excepted for regular polygon, it is probably doomed.

Thus why my example is a regular polygon.  :)    I tried to play with doing some
CSG, but even with the hexagon, it's a royal pain and rapidly gets very complex.
 Some cool "failures" though.  Might be useful for non-smooth decorative column
capital.


Post a reply to this message

Goto Latest 10 Messages Next 1 Messages >>>

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