POV-Ray : Newsgroups : povray.binaries.images : sphere_sweep object trace Server Time
30 Jul 2024 14:30:22 EDT (-0400)
  sphere_sweep object trace (Message 1 to 9 of 9)  
From: [GDS|Entropy]
Subject: sphere_sweep object trace
Date: 16 Oct 2011 15:05:01
Message: <web.4e9b2982cb6a6b1acc7740060@news.povray.org>
This is a first attempt at tracing an object with a sphere_sweep produced from a
non-random cube point cloud. Obviously needs a bit of work before it will be
useful for much.

Right now it kind of looks like the nasty wax-like icing on those wretched
little debbie/hostess cakes [no offense to those companies, just my personal
opinion..still...yuck].

Current issues:
1)    Inside() tests result in no points being usable (all eval as being
inside). Not sure how to reorient_trans() just a vector, as I think that macro
applies to objects. Intend to confirm. Currently consider reorient_trans() as a
possible fix until more information obtained.

2)    Obvious spiral due to method of point generation and array traversal.

3)    Need to pre-generate a spline of same type used in sphere_sweep for
intelligent object placement along said path, as well as ability to pre-evaluate
output of sphere_sweep for fitness and auto-modify to produce desired results.

4)    Finding a use for this. Solution seeking a problem.. Maybe pipes/greeble?
Who knows.

This image isn't particularly artistic, as I'm more interested in the logic of
solving the problem than I am much else, so...yeah.

Ian


Post a reply to this message


Attachments:
Download 'toruscylinderconnection2011.gif' (12 KB)

Preview of image 'toruscylinderconnection2011.gif'
toruscylinderconnection2011.gif


 

From: [GDS|Entropy]
Subject: Re: sphere_sweep object trace
Date: 17 Oct 2011 15:40:00
Message: <web.4e9c837631f7e1e677e50e540@news.povray.org>
Due to lack of Array IndexOf, Contains, Resize, Shuffle [Fisher-Yates and
Bruteforce] and Count Defined Items, I created those macros [among others]. They
seem to work quite well.

This is the same thing as before, but with fisher-yates array reshuffle and
post-trace coincident point removal applied.

Still not pretty, but I had fun solving the problem and got some nifty macros
out of the deal.

If anyone wants the macros I'll post'em.

Ian


Post a reply to this message


Attachments:
Download 'toruscylinderconnection2011_1.gif' (12 KB)

Preview of image 'toruscylinderconnection2011_1.gif'
toruscylinderconnection2011_1.gif


 

From: [GDS|Entropy]
Subject: Re: sphere_sweep object trace
Date: 19 Oct 2011 17:00:00
Message: <web.4e9f3a2f31f7e1e677e50e540@news.povray.org>
And the final output.


Post a reply to this message


Attachments:
Download 'toruscylinderconnection2011_2_scaled.png' (143 KB)

Preview of image 'toruscylinderconnection2011_2_scaled.png'
toruscylinderconnection2011_2_scaled.png


 

From: Paolo Gibellini
Subject: Re: sphere_sweep object trace
Date: 20 Oct 2011 03:22:23
Message: <4e9fcc2f$1@news.povray.org>
>[GDS|Entropy]  on date 19/10/2011 22:59 wrote:
> And the final output.
It's a very strange object now.
;-)
Paolo


Post a reply to this message

From: Samuel Benge
Subject: Re: sphere_sweep object trace
Date: 20 Oct 2011 15:05:01
Message: <web.4ea06ca731f7e1e6afac46ba0@news.povray.org>
"[GDS|Entropy]" <nomail@nomail> wrote:
> This is a first attempt at tracing an object with a sphere_sweep produced from a
> non-random cube point cloud. Obviously needs a bit of work before it will be
> useful for much.

Hey Ian!

It's turning out to be an interesting study, especially that third image. Could
we get a closeup on that?

> Not sure how to reorient_trans() just a vector, as I think that macro
> applies to objects.

You can transform vectors. Here's the way:

    #include "transforms.inc"

    // central reference
    sphere{0, 0.1 pigment{rgb x}}

    // the untransformed point
    #declare Pt = <0,1,0>;
    sphere{Pt, 0.1 pigment{rgb y}}

    // the transformed point
    #declare Pt = vtransform(Pt, transform{Reorient_Trans(<0,1,0>,<1,0,0>)});
    sphere{Pt, 0.1 pigment{rgb z}}

You can also align an object or vector with exact precision using this
transformation macro from Rune:

    #include "transforms.inc"

    // Rune's macro for aligning an object based on the y and z axes.
    #macro Z_Align( NormalVector, ZVector )
     #local ObjectZ = vnormalize( ZVector );
     #local ObjectY = VPerp_Adjust( NormalVector, ZVector );
     #local ObjectX = vcross( ObjectY, ObjectZ );
     transform{ Shear_Trans( ObjectX, ObjectY, ObjectZ ) }
    #end

The argument "NormalVector" is the direction the object's y-axis will be facing.
The argument "ZVector" is the direction the z-axis of the object will face; it
has a secondary influence over the final result.

As usual, these things parse more quickly when you don't have to include files.

> This image isn't particularly artistic, as I'm more interested in the logic of
> solving the problem than I am much else, so...yeah.

That's what POV-Ray is good for: everything ranging from artistic works to
scientific visualization :)

~Sam


Post a reply to this message

From: [GDS|Entropy]
Subject: Re: sphere_sweep object trace
Date: 21 Oct 2011 06:55:00
Message: <web.4ea14e8a31f7e1e677e50e540@news.povray.org>
"Samuel Benge" <stb### [at] hotmailcom> wrote:

Hows it going Sam? :)

Remind me to send you the code for the N-state N-dimensional CA [still not 100%
done with it, work keepin me busy]...you will need MS XNA framework to run it
though for the 3D window.

> It's turning out to be an interesting study, especially that third image. Could
> we get a closeup on that?

Thanks, and yes. This is the full image. I'm not entirely satisfied with the
superquads for lights, or the texture on large grey bendy bit.

The clear bendys remind me of bean noodles.

> You can transform vectors. Here's the way:

>> snippage

A-ha! Thanks man! I'll have to give those a shot.

Essentially all this file is consists of:
1) point cloud traced to object [vlength=0 and coincident points removed]
2) remaining points shuffled
3) fork to:
   3a) spline interpolation and generic object translation along spline macro
   3b) sphere sweep

A lot of neat reusable macros resulted from this experiment. All utility macros
return values/objects.

Having difficulty getting include files to talk to eachother, so Vector.inc and
Array.inc are merged curently [names are close to standard inc files because
they extend their namesakes].

> That's what POV-Ray is good for: everything ranging from artistic works to
> scientific visualization :)

Thats why pov kicks so much arse. :)
I do wish SDL was strongly typed though. Oh well. I'll live.

> ~Sam

Ian


Post a reply to this message


Attachments:
Download 'toruscylinderconnection2011_2_big.jpg' (125 KB)

Preview of image 'toruscylinderconnection2011_2_big.jpg'
toruscylinderconnection2011_2_big.jpg


 

From: Thomas de Groot
Subject: Re: sphere_sweep object trace
Date: 21 Oct 2011 07:15:50
Message: <4ea15466$1@news.povray.org>
That's impressive indeed.

Thomas


Post a reply to this message

From: Samuel Benge
Subject: Re: sphere_sweep object trace
Date: 22 Oct 2011 21:40:01
Message: <web.4ea36f6a31f7e1e6f8e75d050@news.povray.org>
"[GDS|Entropy]" <nomail@nomail> wrote:
> "Samuel Benge" <stb### [at] hotmailcom> wrote:
>
> Hows it going Sam? :)

Oh, pretty good. Got the 2D CA program just about completed, though I haven't
worked on it for a couple of weeks. It's approximately 98.5% finished, however
it's severely lacking a proper GUI. I should probably post it somewhere, since
it's a very useful app.

> Remind me to send you the code for the N-state N-dimensional CA [still not 100%
> done with it, work keepin me busy]...you will need MS XNA framework to run it >
though for the 3D window.

Sounds cool.

> > It's turning out to be an interesting study, especially that third image. Could
> > we get a closeup on that?
>
> Thanks, and yes. This is the full image. I'm not entirely satisfied with the >
superquads for lights, or the texture 
on large grey bendy bit.

Hmm, very neat. What will it be used for? Or are you just following an idea?

> > You can transform vectors. Here's the way:
>
> >> snippage
>
> A-ha! Thanks man! I'll have to give those a shot.

No problem.

> Having difficulty getting include files to talk to eachother, so Vector.inc and
> Array.inc are merged curently [names are close to standard inc files because > they
extend their namesakes].

What do you mean? Usually when you include all the correct files everything
meshes smoothly.

> > That's what POV-Ray is good for: everything ranging from artistic works to > >
scientific visualization :)
>
> Thats why pov kicks so much arse. :)
> I do wish SDL was strongly typed though. Oh well. I'll live.

Yeah, me too. But it's still a fun language. Some OOP functionality would be
nice :/

~Sam


Post a reply to this message

From: [GDS|Entropy]
Subject: Re: sphere_sweep object trace
Date: 31 Oct 2011 07:05:00
Message: <web.4eae7fed31f7e1e677e50e540@news.povray.org>
"Samuel Benge" <stb### [at] hotmailcom> wrote:
> Oh, pretty good. Got the 2D CA program just about completed, though I haven't
> worked on it for a couple of weeks. It's approximately 98.5% finished, however
> it's severely lacking a proper GUI. I should probably post it somewhere, since
> it's a very useful app.

Sweeeet! CA are so addictive.
I had to pause development of the various simulation programs I was working on,
but they do a *lot*. I'm not sure how recent the code I sent you is, but I'll
7z and send the source for them in a few days.

> Hmm, very neat. What will it be used for? Or are you just following an idea?

Well, I'm not entirely sure. I was initially trying to make a sphere_sweep based
pipe macro that could wrap all/portions of an object, but then I started chasing
butterflies with the idea, and here we are. :)

I will find something to do with it pretty soon though. Maybe I'll just post the
macros that "do stuff" at the core of this, because they are pretty useful
(especially the array function macros and object trace spline generator).

> What do you mean? Usually when you include all the correct files everything
> meshes smoothly.

I tried referencing .inc files from inside other .inc files and tried .mcr
files, but I kept getting weird messages that basically said pov couldn't find
the included file. These are not in the main include path, but I don't see why
that would have stopped it, since .inc files in the same folder as the pov file
calling them present no problem.

> Yeah, me too. But it's still a fun language. Some OOP functionality would be
> nice :/

Yes, it very much would be!

> ~Sam


Post a reply to this message

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