POV-Ray : Newsgroups : povray.general : Modeling complicated objects in POV-Ray Server Time
10 Aug 2024 05:13:53 EDT (-0400)
  Modeling complicated objects in POV-Ray (Message 6 to 15 of 15)  
<<< Previous 5 Messages Goto Initial 10 Messages
From: Tor Olav Kristensen
Subject: Re: Modeling complicated objects in POV-Ray
Date: 28 Mar 2000 08:31:33
Message: <38E0B316.800EE12C@online.no>
Tor Olav Kristensen wrote:

> As an example I have included below some macros that
> solve your second problem (In 3D-space though).

Oops, I didn't read this thoroughly:

> Bjorn Jonsson wrote:
>
> > (2) Given two lines through three points (you can think of this as two
> > out of three sides on a triangle), determine the center and radius of a
> > circle which 'touches' one of the lines at a point with a known distance
> > from the point common to the two lines.

The macros I posted finds the centre of a circle with a GIVEN radius,
and that touches BOTH of your lines. The "touch-points" are also
returned together with the normal-vector for the plane that the two
lines lies in. (The centre of the circle lies in this plane.)

Tor Olav

mailto:tor### [at] hotmailcom
http://www.crosswinds.net/~tok/tokrays.html


Post a reply to this message

From: Ron Parker
Subject: Re: Modeling complicated objects in POV-Ray
Date: 28 Mar 2000 11:47:26
Message: <38e0e21e@news.povray.org>
On Mon, 27 Mar 2000 22:46:28 -0000, Bjorn Jonsson wrote:
>(2) Given two lines through three points (you can think of this as two 
>out of three sides on a triangle), determine the center and radius of a 
>circle which 'touches' one of the lines at a point with a known distance 
>from the point common to the two lines.

As written, there are an infinite number of solutions to this problem;
one is the circle with its center at the point common to the two lines 
and with a radius of the 'known distance.'

Even if you specify that 'touches' means 'is tangent to,' there are an
infinite number of solutions.  Do you mean one that is tangent to both
lines?

-- 
These are my opinions.  I do NOT speak for the POV-Team.
The superpatch: http://www2.fwi.com/~parkerr/superpatch/
My other stuff: http://www2.fwi.com/~parkerr/traces.html


Post a reply to this message

From: Bjorn Jonsson
Subject: Re: Modeling complicated objects in POV-Ray
Date: 28 Mar 2000 13:17:10
Message: <MPG.134b08509433e9fd989681@news.povray.org>
In article <38e0e21e@news.povray.org>, ron### [at] povrayorg says...
> On Mon, 27 Mar 2000 22:46:28 -0000, Bjorn Jonsson wrote:
> >(2) Given two lines through three points (you can think of this as two 
> >out of three sides on a triangle), determine the center and radius of a 
> >circle which 'touches' one of the lines at a point with a known distance 
> >from the point common to the two lines.
> 
> As written, there are an infinite number of solutions to this problem;
> one is the circle with its center at the point common to the two lines 
> and with a radius of the 'known distance.'
> 
> Even if you specify that 'touches' means 'is tangent to,' there are an
> infinite number of solutions.  Do you mean one that is tangent to both
> lines?

Oops... yes, there is an error in what I wrote above. I meant that the 
circle is tangential to *both* lines, not just one of them.

Thanks for correcting this rather silly error.

Bjorn


Post a reply to this message

From: Ron Parker
Subject: Re: Modeling complicated objects in POV-Ray
Date: 28 Mar 2000 13:31:01
Message: <38e0fa65@news.povray.org>
On Mon, 27 Mar 2000 22:46:28 -0000, Bjorn Jonsson wrote:
>And so on, I have written about 5-7 such utilities in recent weeks. I 
>use the results from them primarily in POV's union and difference 
>statements. Non-programmers can't create utilities like this (and 
>calculating something like this on e.g. a pocket calculator is extremely 
>tedious) so I'm wondering if I'm missing something, are utilities like 
>this available somewhere (if that is the case then *that's* what I've 
>missed ;-), are you using such utilities or is what I'm doing unusual in 
>some way (I don't think so) ?

Some utilities like this are available.  John VanSickle has a few in his
Thoroughly Useful Macros collection, there are others scattered throughout 
the newsgroups here, and there are others on various web pages around the
net.  There used to be a site, #MacroScope, that was a collection of such 
macros, but it is now defunct.  The macros from that site, and many more,
can be found at 

http://www.povray.org/links/POV-Ray_Include_Macro_and_Object_Files/Macro_Files/

My torus spline macro isn't linked from there, but I'm sure that's an oversight.
It's included in the #MacroScope file anyway, or available from the "other 
stuff" link below.

-- 
These are my opinions.  I do NOT speak for the POV-Team.
The superpatch: http://www2.fwi.com/~parkerr/superpatch/
My other stuff: http://www2.fwi.com/~parkerr/traces.html


Post a reply to this message

From: Ken
Subject: Re: Modeling complicated objects in POV-Ray
Date: 28 Mar 2000 13:38:49
Message: <38E0F809.DA4415CC@pacbell.net>
Ron Parker wrote:

> My torus spline macro isn't linked from there,

It is linked from -

http://www.povray.org/links/POV-Ray_Include_Macro_and_Object_Files/Object_and_Scene_Files/

-- 
Ken Tyler -  1300+ Povray, Graphics, 3D Rendering, and Raytracing Links:
http://home.pacbell.net/tylereng/index.html http://www.povray.org/links/


Post a reply to this message

From: Bjorn Jonsson
Subject: Re: Modeling complicated objects in POV-Ray
Date: 28 Mar 2000 17:31:46
Message: <MPG.134b43f951bc66ac989682@news.povray.org>
In article <POzfOBclcGzgXuL4XVuaeAuoKOY6@4ax.com>, pet### [at] usanet 
says...

<snip>

> If you could turn those (really useful!) utilities into povray macros,
> I am sure many people will be thankful for making their lives a tad
> easier. About your question, I would usually use a macro for such
> tasks because it spares some trouble with switching consoles, copying
> & pasting etc.

This could be very interesting to do at some time. One of my problems 
though is that modelling in POV has turned out to be so fun that I've 
found it a little difficult to give myself time to finish reading the 
manual ;-). Despite this I knew a little about macros but since I had 
lots of code related to 2D/3D geometry lying around on my machine it was 
straightforward to 'tweak' it for this use.

I have also wondered that having lots of macros as opposed to numercial 
'constants' and coordinates might mess up the POV file since what I'm 
doing is not 'dynamic' - the objects don't change shape, not even in an 
animation. But I'm probably still a POV-beginner and don't have a good 
'feel' for how to do some things although it's improving - I have already 
partially rewritten the oldest (a few weeks) parts of my Cassini 
spacecraft POV file.

An example of what I have used my utilities for is creating a prism-like 
(as seen from a distance) object which has round corners when seen close-
up. I didn't achieve results I was satisfied with by using quadratic or 
cubic spline prisms (which is what I tried at first).

Bjorn Jonsson
bjj### [at] zzzmmediais - http://www.mmedia.is/~bjj
Remove yyy and zzz to reply


Post a reply to this message

From: Bjorn Jonsson
Subject: Re: Modeling complicated objects in POV-Ray
Date: 28 Mar 2000 17:39:28
Message: <MPG.134b45c73a796a1f989683@news.povray.org>
In article <38E0B316.800EE12C@online.no>, tto### [at] onlineno says...
> Tor Olav Kristensen wrote:
> 
> > As an example I have included below some macros that
> > solve your second problem (In 3D-space though).
> 
> Oops, I didn't read this thoroughly:

There was an error in what I posted so this is not strange.
 
> > Bjorn Jonsson wrote:
> >
> > > (2) Given two lines through three points (you can think of this as two
> > > out of three sides on a triangle), determine the center and radius of a
> > > circle which 'touches' one of the lines at a point with a known distance
> > > from the point common to the two lines.

The above is erroneous as indicated in another article. I meant a circle 
that 'touches' (is tangential to) *both* lines. Sorry for this error.
 
> The macros I posted finds the centre of a circle with a GIVEN radius,
> and that touches BOTH of your lines. The "touch-points" are also
> returned together with the normal-vector for the plane that the two
> lines lies in. (The centre of the circle lies in this plane.)

Which is very similar to what I was doing. Thanks for posting your 
macros, they are a good 'jump-start' for me in starting to have a proper 
look at POV macros.

Bjorn


Post a reply to this message

From: Mark Donovan
Subject: Re: Modeling complicated objects in POV-Ray
Date: 29 Mar 2000 13:35:15
Message: <38E24CDF.EEC053B3@email.com>
One way to avoid complex calculations for general intersections of
objects in 3D space is to assemble composite objects at the origin or on
a convenient coordinate axis. With the centers or edges of objects at
the origin, finding tangents and intersections is usually simple. After
a larger object is assembled, rotate and translate it into final position.

Mark

Bjorn Jonsson wrote:
> 
> The point is that while making this
> model I have found it almost impossible to construct certain parts of it
> without using lots of small 'command line' utilities I wrote in C++ to do
> some geometric calculations...
>


Post a reply to this message

From: cadman
Subject: Re: Modeling complicated objects in POV-Ray
Date: 29 Mar 2000 18:23:07
Message: <38e2905b@news.povray.org>
This sounds like fun.  Can I help turn your code into POV macros?  Or see
your source code?  I like to program, and would be glad to help!

Bjorn Jonsson <bjj### [at] zzzmmediais> wrote in message
news:MPG.134b43f951bc66ac989682@news.povray.org...
> In article <POzfOBclcGzgXuL4XVuaeAuoKOY6@4ax.com>, pet### [at] usanet
> says...
>
> <snip>
>
> > If you could turn those (really useful!) utilities into povray macros,
> > I am sure many people will be thankful for making their lives a tad
> > easier. About your question, I would usually use a macro for such
> > tasks because it spares some trouble with switching consoles, copying
> > & pasting etc.
>
> This could be very interesting to do at some time. One of my problems
> though is that modelling in POV has turned out to be so fun that I've
> found it a little difficult to give myself time to finish reading the
> manual ;-). Despite this I knew a little about macros but since I had
> lots of code related to 2D/3D geometry lying around on my machine it was
> straightforward to 'tweak' it for this use.
>
> I have also wondered that having lots of macros as opposed to numercial
> 'constants' and coordinates might mess up the POV file since what I'm
> doing is not 'dynamic' - the objects don't change shape, not even in an
> animation. But I'm probably still a POV-beginner and don't have a good
> 'feel' for how to do some things although it's improving - I have already
> partially rewritten the oldest (a few weeks) parts of my Cassini
> spacecraft POV file.
>
> An example of what I have used my utilities for is creating a prism-like
> (as seen from a distance) object which has round corners when seen close-
> up. I didn't achieve results I was satisfied with by using quadratic or
> cubic spline prisms (which is what I tried at first).
>
> Bjorn Jonsson
> bjj### [at] zzzmmediais - http://www.mmedia.is/~bjj
> Remove yyy and zzz to reply


Post a reply to this message

From: David Fontaine
Subject: Re: Modeling complicated objects in POV-Ray
Date: 30 Mar 2000 21:54:05
Message: <38E41234.DE081B93@faricy.net>
As a (ex?)programmer myself, a bit of a math whiz, and a die-hard hand-coder,
I usually write some macros to do it, or if it's a one-time thing, just whip
out my 89 :-)
Cassini would have a fairly definable shape since it's a space vehicle, lots
of cones and stuff, tedious but fairly approachable. Lots of trig probably.
The big limitation of hand-coding, though, is when you run into more organic
or ergonomic curves, like maybe a computer mouse, in which case I use sPatch.

--
___     _______________________________________________
 | \     |_          <dav### [at] faricynet> <ICQ 55354965>
 |_/avid |ontaine        http://www.faricy.net/~davidf/

"The only difference between me and a madman is that I'm not mad." -Dali


Post a reply to this message

<<< Previous 5 Messages Goto Initial 10 Messages

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