MASON-INTEREST-L Archives

October 2015

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show HTML Part by Default
Condense Mail Headers

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

Print Reply
Sender:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Date:
Thu, 1 Oct 2015 11:18:59 -0400
MIME-version:
1.0 (Mac OS X Mail 7.3 \(1878.6\))
Reply-To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Content-type:
text/plain; charset=iso-8859-1
Subject:
From:
Sean Luke <[log in to unmask]>
In-Reply-To:
Message-ID:
Content-Transfer-Encoding:
8bit
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