POV-Ray : Newsgroups : povray.general : Spline object: what is it? Server Time
5 Aug 2024 18:23:06 EDT (-0400)
  Spline object: what is it? (Message 21 to 30 of 38)  
<<< Previous 10 Messages Goto Latest 10 Messages Next 8 Messages >>>
From: Shay
Subject: Re: Spline object: what is it?
Date: 18 Sep 2002 17:19:21
Message: <3d88edd9$1@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote in message news:3d88eaa4@news.povray.org...
>
>   If you are going to use duplicated (or
triplicated/quadruplicated/whatever)
> points, better use the regular mesh (as it internally joins duplicates
into
> one, thus saving memory).
>

Does this use less memory than joining them yourself into a mesh2
vertex_vector list? If so I have some recoding to do.

 -Shay


Post a reply to this message

From: Shay
Subject: Re: Spline object: what is it?
Date: 18 Sep 2002 17:43:57
Message: <3d88f39d$1@news.povray.org>
Greg M. Johnson <gregj:-)565### [at] aolcom> wrote in message
news:3d88dc96$1@news.povray.org...
>
> Is there a spline visualizer scene file already out there based on mesh2:
I
> could tweak mine to do this if it were a benefit to the community .
8o{|
>

I don't see any benefit for visualizing splines. It's too easy to do this
with a #while loop. Your code could be modified into an extrusion macro,
however. I think that many would find use in that.

 -Shay


Post a reply to this message

From: Rohan Bernett
Subject: Re: Spline object: what is it?
Date: 19 Sep 2002 00:45:04
Message: <web.3d89562229f3d87418ccf4f70@news.povray.org>
>However, I think it could be done now, with a bit of rework of the
>sphere_sweep syntax. Just let the sphere_sweep take a four-dimensional
>spline as input data.

This could be used to make the tubing for a neon sign. Use the spline once
for the outer part of the tube, then again with smaller radius for the
inner part. Perhaps this could be done with a loop inside the sphere_sweep
object. Then use csg to make the hollow tube.

Rohan _e_ii


Post a reply to this message

From: Warp
Subject: Re: Spline object: what is it?
Date: 19 Sep 2002 08:11:23
Message: <3d89beea@news.povray.org>
Shay <sah### [at] simcopartscom> wrote:
> Does this use less memory than joining them yourself into a mesh2
> vertex_vector list? If so I have some recoding to do.

  If you do the same job as POV-Ray does internally, ie. join all duplicate
points into one in the vertex_vector list, then you are doing exactly that:
the same job as POV-Ray.
  The advantage of allowing POV-Ray to do it (ie. by you using 'mesh') is
that it will save you work and will probably be a lot faster (finding
duplicate points is not a trivial task and needs clever data structures
in order to be fast). The best thing you can do is to figure out a way of
not creating duplicate points in the first place (this is possible and even
easy in many cases, and the issue in question is this kind of case).
  Of course the disadvantage of using mesh is that it takes more disk space
(if you write it to a file) and it may be a bit slower to parse (if nothing
else, because it's more to read, being a larger file).

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Shay
Subject: Re: Spline object: what is it?
Date: 19 Sep 2002 09:59:32
Message: <3d89d844@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote in message news:3d89beea@news.povray.org...
>
>   If you do the same job as POV-Ray does internally, ie. join all
duplicate
> points into one in the vertex_vector list, then you are doing exactly
that:
> the same job as POV-Ray.
>
Yes, but I still prefer to do it myself. Even if my mesh generation code is
sometimes crap, I like the output to be as perfect as possible. Besides, I
already have the code to identify the duplicates, so it's now only a matter
of waiting a few minutes for it to parse.

 -Shay


Post a reply to this message

From: Christopher James Huff
Subject: Re: Spline object: what is it?
Date: 19 Sep 2002 11:14:48
Message: <chrishuff-CEF64D.11131019092002@netplex.aussie.org>
In article <3d89d844@news.povray.org>, "Shay" <sah### [at] simcopartscom> 
wrote:

> Yes, but I still prefer to do it myself. Even if my mesh generation code is
> sometimes crap, I like the output to be as perfect as possible. Besides, I
> already have the code to identify the duplicates, so it's now only a matter
> of waiting a few minutes for it to parse.

The output will be identical. It is just that the built-in feature will 
always get the vertices right, while your duplicate-removal code might 
have a bug. Using the built-in feature will get a "perfect" result 
(correct image and minimal memory usage), and be much faster than doing 
the duplicate removal in POV script. The mesh2 syntax is mainly useful 
for working with mesh files...the files are smaller and faster to parse.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Christopher James Huff
Subject: Re: Spline object: what is it?
Date: 19 Sep 2002 11:16:08
Message: <chrishuff-989949.11143019092002@netplex.aussie.org>
In article <web.3d89562229f3d87418ccf4f70@news.povray.org>,
 "Rohan Bernett" <rox### [at] yahoocom> wrote:

> This could be used to make the tubing for a neon sign. Use the spline once
> for the outer part of the tube, then again with smaller radius for the
> inner part. Perhaps this could be done with a loop inside the sphere_sweep
> object. Then use csg to make the hollow tube.

Why would this require a new syntax?

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Shay
Subject: Re: Spline object: what is it?
Date: 19 Sep 2002 11:42:44
Message: <3d89f074@news.povray.org>
Christopher James Huff <chr### [at] maccom> wrote in message
news:chr### [at] netplexaussieorg...
>
> <snip>while your duplicate-removal code might
> have a bug.
>
In this case it's just too simple to f__k up.

> The mesh2 syntax is mainly useful
> for working with mesh files...the files are smaller and faster to parse.
>
That is a consideration, albeit a small one. My IRTC entry, currently one
large mesh2 file, already takes about 8 seconds to parse. Another
consideration is that when forming mesh objects not generated by an
equation, the vertices must be grouped anyway in order to calculate the
normal vectors. The work to translate the file into a mesh2 after having
grouped the vertices for the purpose of calculating the normal vectors is so
small that it is worth it to me to complete the conversion even for a small
consideration. This is of course provided that my code is error free, which
I am confident it is.

 -Shay


Post a reply to this message

From: Warp
Subject: Re: Spline object: what is it?
Date: 19 Sep 2002 17:14:46
Message: <3d8a3e46@news.povray.org>
Christopher James Huff <chr### [at] maccom> wrote:
> The output will be identical. It is just that the built-in feature will 
> always get the vertices right, while your duplicate-removal code might 
> have a bug.

  It's often the case that you can build the mesh without creating
duplicate vertex points at all. This way you don't have to remove anything.
  For example, if you make a box using mesh2, you simply create 8 points
in the vertex list and then use their index values in the faces list.
Similarly for more advanced shapes, usually created using loops (such
as cylinders, spheres, etc).

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Philippe Lhoste
Subject: Re: Spline object: what is it?
Date: 20 Sep 2002 10:14:54
Message: <Xns928FA512C39C1PhiLho@204.213.191.226>
"Shay" <sah### [at] simcopartscom> wrote in news:3d89f074@news.povray.org:

> 
> Christopher James Huff <chr### [at] maccom> wrote in message
> news:chr### [at] netplexaussieorg...
>>
>> <snip>while your duplicate-removal code might
>> have a bug.
>>
> In this case it's just too simple to f__k up.

Uh? What is this function? In which include file can I find it?
Does it look nice, used in an isosurface?
:-P

-- 
--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--=#=--
Philippe Lhoste (Paris -- France)
Professional programmer and amateur artist
http://jove.prohosting.com/~philho/


Post a reply to this message

<<< Previous 10 Messages Goto Latest 10 Messages Next 8 Messages >>>

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