Pointlist from move command?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Pointlist from move command?

Michael Kristensen
Hi there

Is there a way to get a complete pointlist from all the points an  
object visiting through a move command on a polygon.

I do not mean the polygon corner points but all the points that make  
up the lines of the polygon.

Thanks

Mic
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Pointlist from move command?

Richmond Mathewson-2
On 06/29/2010 11:48 AM, Michael Kristensen wrote:

> Hi there
>
> Is there a way to get a complete pointlist from all the points an
> object visiting through a move command on a polygon.
>
> I do not mean the polygon corner points but all the points that make
> up the lines of the polygon.
>
> Thanks
>

I dunno: if you have an object moving round a polygon (or along a
pathway for that matter),
surely all you have to do is poll the object's position every 2 ticks
and pop the results into the lines
of a field?
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Pointlist from move command?

BNig
In reply to this post by Michael Kristensen
Hi Mic,
if you mean that instead of the corner points of a polygon you want all the intermediate points also then this came up on the forum a while ago and I uploaded a little stack to the forum that does this.
See:
http://forums.runrev.com/phpBB2/viewtopic.php?f=9&t=5191&p=23366&hilit=points+of+polygon#p23366
look for the attachement
calculate points of polygon.rev.zip

(I did not have any real use for all the points but once I had a graphic I "pulled" out some points and animated them when one moves the graphic, since it looked like a bug that is what I called it :) )
as revlet:
http://berndniggemann.on-rev.com/bug/


regards
Bernd
Reply | Threaded
Open this post in threaded view
|

Re: Pointlist from move command?

Michael Kristensen
In reply to this post by Michael Kristensen
Hi and thanks for replies

> I dunno: if you have an object moving round a polygon (or along a
> pathway for that matter),
> surely all you have to do is poll the object's position every 2 ticks
> and pop the results into the lines
> of a field?

I did try that but it seams that the move command is not threaded and  
can not handle other commands while executing.



> Hi Mic,
> if you mean that instead of the corner points of a polygon you want  
> all the
> intermediate points also then this came up on the forum a while ago  
> and I
> uploaded a little stack to the forum that does this.
> See:
> http://forums.runrev.com/phpBB2/viewtopic.php?f=9&t=5191&p=23366&hilit=points+of+polygon#p23366
> look for the attachement
> calculate points of polygon.rev.zip
>
> (I did not have any real use for all the points but once I had a  
> graphic I
> "pulled" out some points and animated them when one moves the  
> graphic, since
> it looked like a bug that is what I called it :) )
> as revlet:
> http://berndniggemann.on-rev.com/bug/


Thanks Bernd

That was just what I needed.

Yet there is a but...

I put this script in the left polygon and I made it none-opaque:

on mouseUp
    beep
    put the mouseLoc into x

    repeat with i = 1 to number of lines of fld fAllPoints
       if x = line i of fld fAllPoints then
          put x
          exit repeat
       else
          put "M " & the mouseLoc
       end if
    end repeat

end mouseUp


The beep gives me audio feedback that I clicked the graphic

In the majority of times the Loc came out with an M in front of it  
meaning that the mouseLoc was not on the pointList

So what Rev considers ON the graphic is different from your pointlist.

Tried to replace TRUNC with ROUND in your script, with same result

Mic


_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution
Reply | Threaded
Open this post in threaded view
|

Re: Pointlist from move command?

Geoff Canyon Rev
I wouldn't recommend the polling solution, but if you want to go with
that, add "without waiting" and you'll be able to get the moving
object's position as it moves.

On Wed, Jun 30, 2010 at 2:48 AM, Michael Kristensen
<[hidden email]> wrote:

> Hi and thanks for replies
>
>> I dunno: if you have an object moving round a polygon (or along a
>> pathway for that matter),
>> surely all you have to do is poll the object's position every 2 ticks
>> and pop the results into the lines
>> of a field?
>
> I did try that but it seams that the move command is not threaded and can
> not handle other commands while executing.
>
>
>
>> Hi Mic,
>> if you mean that instead of the corner points of a polygon you want all
>> the
>> intermediate points also then this came up on the forum a while ago and I
>> uploaded a little stack to the forum that does this.
>> See:
>>
>> http://forums.runrev.com/phpBB2/viewtopic.php?f=9&t=5191&p=23366&hilit=points+of+polygon#p23366
>> look for the attachement
>> calculate points of polygon.rev.zip
>>
>> (I did not have any real use for all the points but once I had a graphic I
>> "pulled" out some points and animated them when one moves the graphic,
>> since
>> it looked like a bug that is what I called it :) )
>> as revlet:
>> http://berndniggemann.on-rev.com/bug/
>
>
> Thanks Bernd
>
> That was just what I needed.
>
> Yet there is a but...
>
> I put this script in the left polygon and I made it none-opaque:
>
> on mouseUp
>   beep
>   put the mouseLoc into x
>
>   repeat with i = 1 to number of lines of fld fAllPoints
>      if x = line i of fld fAllPoints then
>         put x
>         exit repeat
>      else
>         put "M " & the mouseLoc
>      end if
>   end repeat
>
> end mouseUp
>
>
> The beep gives me audio feedback that I clicked the graphic
>
> In the majority of times the Loc came out with an M in front of it meaning
> that the mouseLoc was not on the pointList
>
> So what Rev considers ON the graphic is different from your pointlist.
>
> Tried to replace TRUNC with ROUND in your script, with same result
>
> Mic
>
>
> _______________________________________________
> use-revolution mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
_______________________________________________
use-revolution mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution