MASON-INTEREST-L Archives

October 2015

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Proportional Font
Show Text 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 10:03:08 -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 (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