MASON-INTEREST-L Archives

October 2015

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced Font
Show Text 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 10:03:08 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (22 lines)
On Oct 1, 2015, at 3:37 AM, Christian Meyer <[log in to unmask]> wrote:

> Good addition. It would be nice if Double2D / Int2D are supported as
> well, representing vectors.

Oh, duh, of course I should have included that. Well, Double2D anyway for sure. Probably could have done Point2D.Double etc. too.

> Those classes could just implement Oriented
> and Scaled interfaces to make it work. This would be great for
> visualizing flow fields.

The problem here is that Oriented2D and Scaled2D are actually interfaces in the *portrayal* package, and Double2D and Int2D are in sim.util (intended to be separable from the rest of MASON). I'll just special-case them in VectorPortrayal2D.

> Drawing them directly without calculating angle and length first is way
> faster though, but this does not work together with OrientedPortrayal2D
> which needs the orientation. I guess I need to stick to my custom
> portrayal for the flow fields.

Well, there's always atan. :-) But yes, speed will be an issue. I could special-case a vector shape that's all horizontal and vertical lines to bypass all the affine transformations, but you'd need to give me an idea of what shape I should use. What are you using?

Sean

ATOM RSS1 RSS2