Opened 9 years ago

Last modified 5 years ago

#43 closed defect

ModelGeometry: sizes and orientations depend on sampling density and model orientation — at Initial Version

Reported by: Maciej Komosinski Owned by:
Priority: major Milestone:
Component: Framsticks core Version:
Keywords: Cc:

Description

Testing a ball (genotype //0\np:sh=1,ry=1\n) - balls have no specific orientation and are perfectly symmetrical so this might be an excuse for such dependence, yet... look at the example below. The first value in a line is the sampling density (0.1, 1, 2.5 or 4.32175):

Windows+Visual Studio compilation:

0.1 12.5664 0 [(2.0,2.0,2.0),Orient@(-0,1,0)]
1 12.5664 1.01829 [(2.0,2.0,2.0),Orient@(-0,1,0)]
2.5 12.5664 1.98001 [(2.0,1.9986484217435,1.97326669133902),Orient@(-0.415242,0.498119,0.472743
)]
4.32175 12.5664 2.97095 [(2.0,2.0,2.0),Orient@(-0,1,0)]

So for density=2.5, the computed orientation is weird.

Same test, this time linux+gcc, different result:

0.1 12.5664 0 [(2.0,2.0,2.0),Orient@(-0,1,0)]
1 12.5664 1.01829 [(2.0,2.0,2.0),Orient@(-0,1,0)]
2.5 12.5664 1.98001 [(2.0,2.0,2.0),Orient@(-0,1,0)]
4.32175 12.5664 2.97095 [(2.0,2.0,2.0),Orient@(-0,1,0)]

Identify causes of this influence/non-determinism and eliminate if possible.

Also, check for "sqrt: DOMAIN error" for density=2.

Test with:

frams "var m=Model.newFromString(\"//0\np:sh=1,ry=1\n\"); var mg=ModelGeometry.forModel(m); mg.geom_density=2; Simulator.print(mg.sizesAndAxes());" -q

Change History (0)

Note: See TracTickets for help on using tickets.