MASON-INTEREST-L Archives

October 2015

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Proportional Font
Show HTML Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Sean Luke <[log in to unmask]>
Reply To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Thu, 1 Oct 2015 11:18:59 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (8 lines)
Okay, I've updated VectorPortrayal2D to permit Double2D etc.  Obviously the problem here is the use of atan2 to convert to orientation (and sqrt to convert to scale).  The only way to avoid this would be to draw the vectors using only orthogonal lines (like a T or something), rather than an arbitrary shape using affine transforms.

So what I've done is borrowed some code I had elsewhere which does a fast atan2 approximation.  It's fairly close and about 9x faster than atan2, resulting in about a 6x speedup.  If MASON is doing precise drawing, it'll use the standard atan2.

I also made a few internal tweaks.  Lemme know how it looks.

Sean

ATOM RSS1 RSS2