Contents || Index
11/20/2007

Overlap Method

map simulator home

The x-ray map simulator starts with a blank image, with all pixels having the background count level that you give in the map line.

map dimensions 200 200 background 10.

The shapes that you specify in the succeeding lines are then added (pasted into) the map image, one by one.  You can choose how they are added to the image by specifing the overlap method, which is either add or replace.  The method makes no difference unless the objects overlap.   The replace method ignores any overlapping shapes that are already there -- this acts as if the shapes are opaque.  The add method adds the count levels for the object to whatever is already there -- this acts as if the shapes are transparent.

Replace is the default method - if you do not specify the overlap-method parameter in the map line, eg:

map dimensions 220 220 background 30

as in this first example.

Notes:

The three sets of commented lines can be deleted.  Every time the file is listed, the name, date and directory are added to the beginning.  This keeps track of use.

Note that the overlap-method parameter is not specified, so that the method is replace - boxes do not show through.

;;; wont fit 1.txt 20Nov07 11:47
;;; \DSB\mlx\Data\map-simulator\overlap examples\

;;; wont fit 3.txt 20Nov07 11:40
;;; \Documents and Settings\Bright\Desktop\

;;; wont fit 1.txt 20Nov07 11:37
;;; \Documents and Settings\Bright\Desktop\

map dimensions 220 220 background 30
box position 110 110 intensity 35 sides 180 180 angle 45
box position 110 110 intensity 40 sides 140 140 angle 0
box position 110 110 intensity 45 sides 100 100 angle 0

This warning appears because the first box, which is the first object in the list, is large enough to poke outside the map boundary, as it does here since it is rotated 45 deg.  The warning says "might" because Lispix does not check for rotations - the warning will appear even when and object does fit (try angle 0), but might not when rotated.

Overlap-Method Example

Replace

Add
three-discs-replace.txt 16Nov07 12:15
...\map simulator\overlap examples\

;;; For testing how overlaps are handled.

map dimensions 200 200 background 10 overlap-method replace
disc position 80 80 radius 70 intensity 20
disc position 120 80 radius 70 intensity 25
disc position 100 120 radius 70 intensity 30

three-discs-add.txt 16Nov07 12:15
...\map simulator\overlap examples\

;;; For testing how overlaps are handled.

map dimensions 200 200 background 10 overlap-method add
disc position 80 80 radius 70 intensity 20
disc position 120 80 radius 70 intensity 25
disc position 100 120 radius 70 intensity 30

 

The effect can really be pronounced if many objects add up:

boxes-rot-rep.txt 16Nov07 13:16
...\map-simulator\sample objects\

map dimensions 100 100 background 30 overlap-method replace
box position 50 50 intensity 50 sides 5 50 angle 0
box position 50 50 intensity 50 sides 5 50 angle 20
box position 50 50 intensity 50 sides 5 50 angle 40
box position 50 50 intensity 50 sides 5 50 angle 60
box position 50 50 intensity 50 sides 5 50 angle 80
box position 50 50 intensity 50 sides 5 50 angle 100
box position 50 50 intensity 50 sides 5 50 angle 120

boxes-rot-add.txt 16Nov07 13:16
...\map-simulator\sample objects\

map dimensions 100 100 background 30 overlap-method add
box position 50 50 intensity 50 sides 5 50 angle 0
box position 50 50 intensity 50 sides 5 50 angle 20
box position 50 50 intensity 50 sides 5 50 angle 40
box position 50 50 intensity 50 sides 5 50 angle 60
box position 50 50 intensity 50 sides 5 50 angle 80
box position 50 50 intensity 50 sides 5 50 angle 100
box position 50 50 intensity 50 sides 5 50 angle 120