[PD] A question...

morph_2016 at yahoo.co.uk morph_2016 at yahoo.co.uk
Fri May 1 17:13:02 CEST 2009


Hi Simon,

To be honest, I didn't really understand your question at first. It pays to be clear - but I sometimes don't get an answer from the list either. If you make it clear early on that your question is about a specific object - perhaps in the subject line of your email, it may get a better response.

You must realise that everything is just a way of storing and transmitting data - numbers and symbols. The co-ordinates you store in the array for splinepath are (floating point number) co-ordinates in the three-dimensional space of the gemwin. So the start and endpoints for your animations are specified by the first set of 3 co-ordinates and the last set of 3 co-ordinates.
The co-ordinates in GEM are relative to the centre of the space, so X=0, Y=0, Z=0 sent into a translateXYZ object will send another object (sphere, cube, rectangle etc) to the centre of the gem window. This is why the ball is always at the right-top-front corner of the example I sent you - because the numbers sent into the translateXYZ object are all positive. Change the 40 to -40 in the attached PD patch.

A word about arrays: an array is just a list of numbers really. Although it is displayed as a graph in PD, the input to [splinepath 3] takes three numbers from the array at a time, so the one-dimensional graph view in PD is quite useless for visualizing this. If the first set of co-ordinates is set to -1, -1, -1, the graph of the array will display this as a straight line, whereas in fact it is a single point in three dimensional space. So whereas a graph or a list of the array contents might show:
-1,-1,-1,0,1,-0.5,2,2,0
the actual structure being read by the [spline_path] object is:
Point A: X=-1, Y=-1, Z=-1
Point B: X=0,  Y=1, Z=-0.5
Point C: X=2,  Y=2, Z=0

Best of luck with it,
Ed

--- On Fri, 1/5/09, Simon Ball <sballmada at googlemail.com> wrote:

> From: Simon Ball <sballmada at googlemail.com>
> Subject: Re: A question...
> To: "Ed Kelly" <morph_2016 at yahoo.co.uk>
> Date: Friday, 1 May, 2009, 10:12 AM
> Thanks Ed, that's definitely given
> me a clearer view of what spline path does, I certainly have
> more control now than I did previously. Is there a way to
> get more precise information to the table arrays, such as
> defining start and end points for the animation?
> 
> 
> I have put the question to the list, but I haven't had
> a response. Perhaps my e-mails are not getting through, but
> I imagine its either because people are bored of my
> questions or there is some obvious documentation that
> I'm missing. Are there any walk through's/tutorials
> on this kind of animation in GEM?
> 
> 
> Thanks again for your help, I think Andy is planning to get
> you in for another workshop at some point, which would be
> really useful. I've been getting more into PD so have a
> vast array of questions and should have a better
> understanding of the answers of the answers you give!
> 
> 
> Thanks again mate
> Simon
> 
> On Thu, Apr 30, 2009 at 5:15 PM,
> Ed Kelly <morph_2016 at yahoo.co.uk>
> wrote:
> 
> Hi Simon...
> 
> 
> 
> Apologies for the late reply. It is my understanding that
> [spline_path] interpolates between points in a table. These
> are read out in multiples, when a number between 0 and 1 is
> sent into the first inlet corresponding to the position in
> the table.
> 
> 
> 
> 
> These are at this stage just numbers. If they are sent to a
> translateXYZ object then they become position co-ordinates,
> or if they are sent to a rotateXYZ object they become
> rotation values in degrees.
> 
> 
> 
> Since spline_path reads from a table, the values should be
> stored as triples: x, y and z co-ordinate values can be
> manipulated by tabwrite objects as long as they are input to
> the table in series (for each point x, then y, then z). Or
> if you just want to work in two dimensions, x and y
> co-ordinates stored as pairs will work. The table size must
> be divisible by the dimensions, so a multiple of 3 for xyz
> co-ords etc. The output is a smoothed (spline) curve - a
> spline path through n-dimensions.
> 
> 
> 
> 
> Have a look at this example. one of the spline_path objects
> controls a sphere's position, whereas the other controls
> its rotation.
> 
> 
> 
> Hope this helps!
> 
> Ed
> 
> 
> 
> 
> 
> Lone Shark: Synchromatic: Out December 1st 2008
> 
> http://www.pyramidtransmissions.com/store
> 
> Also available through the iTunes store
> 
> 
> 
> 
> 
> --- On Tue, 21/4/09, Simon Ball <sballmada at googlemail.com>
> wrote:
> 
> 
> 
> > From: Simon Ball <sballmada at googlemail.com>
> 
> > Subject: A question...
> 
> > To: "Ed Kelly" <morph_2016 at yahoo.co.uk>
> 
> > Date: Tuesday, 21 April, 2009, 12:45 PM
> 
> > Hi Ed
> 
> >
> 
> > Simon from digital arts here, I was hoping you might
> be
> 
> > able to help with a question that I put to the list
> but
> 
> > received no answer for. I think they might be getting
> bored
> 
> > of my inability to keep up with their answers! Or
> more
> 
> > likely, the answers are easy to find but I'm not
> finding
> 
> > them...
> 
> >
> 
> >
> 
> > Hi list
> 
> >
> 
> > I'm trying to understand how tables/arrays work
> with
> 
> > animations. As far as I can see, I can place a set of
> 
> > coordinates in
> 
> > text file and then use an array to apply this to
> elements
> 
> > in a scene. I
> 
> > have been looking at various examples, notably
> 
> > [splinepath], which uses
> 
> > [line] to govern the length and speed of the
> movement.
> 
> > However, I'm
> 
> > struggling to understand the exact relationship
> between the
> 
> > co-ordinates written in the text file and what
> actually
> 
> > happens to an
> 
> > image when rendered. Sometimes I change the numbers
> and the
> 
> > animation
> 
> > stays the same, other times it appears erratic.
> 
> >
> 
> >
> 
> > I'm trying to trigger animations so that they
> float and
> 
> > rotate into
> 
> > place. If anyone has any ideas on the best way to
> approach
> 
> > this, or can
> 
> > direct me to some useful help files, I would really
> 
> > appreciate it. I
> 
> > was looking at a pdf that was packaged with
> PD-extended
> 
> > called
> 
> > 'GemPrimer'. The documentation was clear and
> 
> > insightful for someone of
> 
> > my level (beginner!) and hoping there might more files
> like
> 
> > this one...
> 
> >
> 
> >
> 
> > Mac OSX Intel Core Duo 10.4.11. PD-Extended 0.40.3.
> 
> >
> 
> > Thanks
> 
> > Simon
> 
> >
> 
> > Basically, I'm trying to acheive this...
> 
> > http://simonthebold.wordpress.com/2009/03/26/prototype/
> 
> >
> 
> >
> 
> > Where the silouettes represent people moving in front
> of
> 
> > the screen, the animations kind of mimic their
> movement. Any
> 
> > suggestions would be most useful.
> 
> >
> 
> > Hope this isn't too much trouble.
> 
> > Regards
> 
> > Simon
> 
> >
> 
> > MA Digital Arts
> 
> >
> 
> >
> 
> 
> 
> 
> 
>       
> 
>


      
-------------- next part --------------
A non-text attachment was scrubbed...
Name: splinepaths2.zip
Type: application/zip
Size: 13153 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20090501/b5b51051/attachment.zip>


More information about the Pd-list mailing list