MASON-INTEREST-L Archives

June 2012

MASON-INTEREST-L@LISTSERV.GMU.EDU

Options: Use Monospaced 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
Mime-Version:
1.0
Sender:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Subject:
From:
Joaquin Zabalo <[log in to unmask]>
Date:
Mon, 18 Jun 2012 12:25:50 -0400
Content-Transfer-Encoding:
8bit
Content-Type:
text/plain; charset="ISO-8859-1"
Reply-To:
MASON Multiagent Simulation Toolkit <[log in to unmask]>
Parts/Attachments:
text/plain (28 lines)
Hi,

Iím using OvalPortrayal2D(6) to display large disks and OvalPortrayal2D() to
display small disks and I need to know when the small disk overlaps the
large disk.

Is the location of a disk given by its center? If so, then if I knew the
radius r of the large disk, I could use something like:

Bag bag = baysim.fishSpace.getObjectsExactlyWithinDistance(myNewLoc, r);

where myNewLoc is the location of the small disk.

This should return all the large disks whose centers are within r of the
center of the small disk or, equivalently, all large disks containing the
small disk.

My question is, what is the radius of the large disk OvalPortrayal2D(6)?
Does scale 6 denote the number of units across and hence the diameter of the
disk?

Would this be the correct way to determine if the disks overlap or is there
a better way?

Thanks.

Joaquin

ATOM RSS1 RSS2