POV-Ray : Newsgroups : povray.off-topic : discrete torque Server Time
28 Jul 2024 16:18:06 EDT (-0400)
  discrete torque (Message 11 to 20 of 20)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: scott
Subject: Re: discrete torque
Date: 26 Feb 2014 05:14:45
Message: <530dbe95$1@news.povray.org>
> Non-spherical geodesic domes -- dual to figures like the attached --
> where the pentagonal hubs are *not* arranged as the vertices of an
> icosahedron.  The "parts" I mentioned are the hubs, the "nodes" are the
> tips of five or six radiating rods; each tip seeks a corresponding tip.
>
> (In general the nodes won't exactly match, and even if they did there
> would be an angle between rods; cubic splines will cover both flaws.)
>
>> and what you would like help with.
>
> I want to know how to generate, for each part, a rotation-translation
> matrix that brings its nodes nearer to their mates.

In that case I recommend you follow the 2nd solution in my original reply.

> (Scare-quotes because I don't want to give the body momentum, linear or
> angular; I want it to jump to a new position and wait quietly for the
> next cycle.)
> Torque is a vector, and vectors can be added and rescaled.
> But how do I turn the resulting torque vector into a rotation matrix?

The "short-cut" you are trying to find would only work if the resultant 
torque on the body were constant. But because the forces on the nodes 
are causing the body to rotate, the resultant torque will be 
continuously changing. The only way to solve this is to integrate the 
torque to get angular momentum, then integrate again to get the rotation.


Post a reply to this message

From: scott
Subject: Re: discrete torque
Date: 26 Feb 2014 06:56:52
Message: <530dd684$1@news.povray.org>
> I want to know how to generate, for each part, a rotation-translation
> matrix that brings its nodes nearer to their mates.

Do you really mean this? Or do you actually only want to find the matrix 
that brings the nodes *nearest* to their mates? In that case it's just 
an optimisation problem and nothing to do with kinetics and things moving.


Post a reply to this message

From: Anton Sherwood
Subject: Re: discrete torque
Date: 26 Feb 2014 13:59:46
Message: <530e39a2$1@news.povray.org>
>> I want to know how to generate, for each part, a
>> rotation-translation matrix that brings its nodes
>> nearer to their mates.

On 2014-2-26 03:56, scott wrote:
> Do you really mean this? Or do you actually only want to find the
> matrix that brings the nodes *nearest* to their mates?

Sure I'd like to find the transforms that bring the system to its
optimal state, but I'm assuming it won't get there in one step.

> In that case it's just an optimisation problem and
> nothing to do with kinetics and things moving.

As I think I've said twice already.  Though I use the word "torque"
for want of a better, I'm not interested in kinetics, angular
momentum, animation, anything like that.

-- 
*\\* Anton Sherwood *\\* www.bendwavy.org


Post a reply to this message

From: Anton Sherwood
Subject: Re: discrete torque
Date: 26 Feb 2014 15:11:19
Message: <530e4a67$1@news.povray.org>
Scott, thanks for the links.  I don't know why I didn't think of 
quaternions.  (Well, maybe because I've never used them!)

Given the rotation axis (the sum of pseudo-torque vectors), the problem 
remains of determining what angle to turn about that axis.  Maybe I'll 
simply use a small constant angle -- resulting in the animation that I 
keep saying I don't want to make!

... Hm, I can start with an arbitrary step-angle of 1 radian, say, and 
reduce it after each round by the fraction of the population for which 
the torque-vector has a negative dot product with its predecessor ...

-- 
*\\* Anton Sherwood *\\* www.bendwavy.org


Post a reply to this message

From: scott
Subject: Re: discrete torque
Date: 27 Feb 2014 03:58:54
Message: <530efe4e$1@news.povray.org>
>>> I want to know how to generate, for each part, a
>>> rotation-translation matrix that brings its nodes
>>> nearer to their mates.
>
>> Do you really mean this? Or do you actually only want to find the
>> matrix that brings the nodes *nearest* to their mates?
>
> Sure I'd like to find the transforms that bring the system to its
> optimal state, but I'm assuming it won't get there in one step.

I think this incorrect assumption is why you keep asking about stepping 
by half, rotation stepping and getting "nearer" to the nodes each step, 
when it sounds now like you don't really want to do that.

If you don't need all the intermediate steps then it's just an 
optimisation problem to find the rotation/translation matrix that 
minimises the sum of the distances between each node pair (or another 
similar metric). You can use the MS Excel solver if you only have a 
finite number of bodies to "design", probably faster than trying to code 
a solver or find a library.


Post a reply to this message

From: Anton Sherwood
Subject: Re: discrete torque
Date: 27 Feb 2014 19:54:59
Message: <530fde63$1@news.povray.org>
On 2014-2-27 00:58, scott wrote:
> [...] it's just an optimisation problem to find the
> rotation/translation matrix that minimises the sum of the
> distances between each node pair (or another similar metric).
> You can use the MS Excel solver [...]

Can it minimize a quadratic function, subject to quadratic constraints?

-- 
*\\* Anton Sherwood *\\* www.bendwavy.org


Post a reply to this message

From: scott
Subject: Re: discrete torque
Date: 28 Feb 2014 04:39:10
Message: <5310593e$1@news.povray.org>
>> [...] it's just an optimisation problem to find the
>> rotation/translation matrix that minimises the sum of the
>> distances between each node pair (or another similar metric).
>> You can use the MS Excel solver [...]
>
> Can it minimize a quadratic function, subject to quadratic constraints?

The Excel solvers are pretty flexible, they are good at handling a wide 
range of optimisation problems. Attached is what I came up with for 
minimising the distance between nodes on two bodies, it seems to solve 
OK with the evolutionary solver and after it's done will give you the 
best 4x4 rotation/translation matrix.

BTW in Solver Options you might want to turn down the maximum time 
without improvement, I think the default is 30 seconds which is a bit 
long (I made it 5 seconds).


Post a reply to this message


Attachments:
Download 'node solver.xlsx.zip' (14 KB)

From: Anton Sherwood
Subject: Re: discrete torque
Date: 2 Mar 2014 17:23:10
Message: <5313af4e$1@news.povray.org>
On 2014-2-28 01:39, scott wrote:
> The Excel solvers are pretty flexible, they are good at handling a wide
> range of optimisation problems. Attached is what I came up with for
> minimising the distance between nodes on two bodies, it seems to solve
> OK with the evolutionary solver and after it's done will give you the
> best 4x4 rotation/translation matrix.

Thank you.

I don't have Excel, but I have LibreOffice ... and when I try to follow 
your instructions, it says my list of variable cells is invalid.  Argh.

-- 
*\\* Anton Sherwood *\\* www.bendwavy.org


Post a reply to this message

From: scott
Subject: Re: discrete torque
Date: 3 Mar 2014 03:17:52
Message: <53143ab0$1@news.povray.org>
> Thank you.
>
> I don't have Excel, but I have LibreOffice ... and when I try to follow
> your instructions, it says my list of variable cells is invalid.  Argh.

Maybe it doesn't like not having them in a continuous array of cells? 
Anyway I guess you get the idea what it is supposed to be doing.


Post a reply to this message

From: Anton Sherwood
Subject: Re: discrete torque
Date: 3 Mar 2014 14:13:15
Message: <5314d44b$1@news.povray.org>
>> I don't have Excel, but I have LibreOffice ... and when I try to follow
>> your instructions, it says my list of variable cells is invalid.  Argh.
>
> Maybe it doesn't like not having them in a continuous array of cells?

I wonder how much dummy cells would slow it down!

> Anyway I guess you get the idea what it is supposed to be doing.

Yes, thanks.

-- 
*\\* Anton Sherwood *\\* www.bendwavy.org


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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