Presentation is loading. Please wait.

Presentation is loading. Please wait.

USolids meeting 01.06.2015. Conventions. DistanceToIn(p,v) Geant4USolidsVecGeomROOT Point p is Outside No intersection Between shape and ray(p+v*t) Infinity.

Similar presentations


Presentation on theme: "USolids meeting 01.06.2015. Conventions. DistanceToIn(p,v) Geant4USolidsVecGeomROOT Point p is Outside No intersection Between shape and ray(p+v*t) Infinity."— Presentation transcript:

1 USolids meeting 01.06.2015

2 Conventions. DistanceToIn(p,v) Geant4USolidsVecGeomROOT Point p is Outside No intersection Between shape and ray(p+v*t) Infinity Point p is Outside Intersection Between shape and ray(p+v*t) Distance Point p is on Surface0, if 'entering shape', normal.dot(v)<=0 Infinity, if 'leaving shape', normal.dot(v)>0 0, if 'entering shape', normal.dot(v)<=0 Infinity, if 'leaving shape', normal.dot(v)>0 0, if 'entering shape' Infinity, if 'leaving shape' 0, if 'entering shape', normal.dot(v)<=0 Infinity, if 'leaving shape', normal.dot(v)>0 Point p is Inside “Wrong side” No general rule(?), depends on shape 0-Distance If Distance(p,v)<halfTolerance 00Distance DistanceToIn(p,v) return the exact distance (double) to the surface of the shape for given point p and direction v. Normal is pointing outwards shape.

3 Convex shape with flat surfaces, conventions for 'scratching' directions v p1 p1 : DistanceToIn(p1,v) = L1 p2 : DistanceToIn (p2,v) = 0, (normal1,v) < 0 DistanceToOut(p2,v) = L2, (normal1,v) < 0 p3 : DistanceToIn (p3,v) = Infinity, (normal2,v) > 0 DistanceToOut(p3,v) = 0, (normal2,v) > 0 L1 p2 p3 L2 normal1 normal2

4 Convex shape with curved surfaces, conventions for 'scratching' directions p1 : DistanceToIn (p1,v) = Infinity, (normal1,v) = 0 DistanceToOut(p1,v) = 0, (normal1,v) = 0 p1 v normal1

5 Concave shape with curved surfaces, 'scratching' directions P1 : DistanceToIn (p1,v) = 0, (normal1,v) = 0 DistanceToOut(p1,v) = L, (normal1,v) = 0 p1 v normal1 L Concave shape with curved surfaces, 'scratching' directionsConcave shape with curved surfaces, Concave shape with flat surfaces, 'scratching' directions p1 : DistanceToIn(p1,v) = L1, not Infinity p2 : DistanceToIn (p2,v) = 0, (normal1,v) < 0 DistanceToOut(p2,v) = L2, (normal1,v) < 0 p3 : DistanceToIn (p3,v) = Infinity, (normal2,v) > 0 DistanceToOut(p3,v) = 0, (normal2,v) > 0 L1 L2 p1 p2 normal1 normal2 p3 v

6 Concave shapes, 'reentering' directions p1 : DistanceToIn(p1,v) = L1, not Infinity p1 p2 v

7 Conventions. DistanceToIn(p,v) Geant4USolidsVecGeomROOT Point p is Outside No intersection Between shape and ray(p+v*t) Infinity Point p is Outside Intersection Between shape and ray(p+v*t) Distance Point p is on Surface0, if 'entering shape', normal.dot(v) < 0 for convex shapes Infinity for convex shapes or Distance to next Intersection for concave shapes, if 'leaving shape', normal.dot(v) >= 0 for convex shapes 0, if 'entering shape', normal.dot(v) < 0 for convex shapes Infinity for convex shapes or Distance to next Intersection for concave shapes, if 'leaving shape' normal.dot(v) >= 0, for convex shapes 0, if 'entering shape' Infinity for convex shapes or Distance to next Intersection for concave shapes, if 'leaving shape' 0, if 'entering shape', normal.dot(v) < 0 for convex shapes Infinity for convex shapes or Distance to next Intersection for concave shapes, if 'leaving shape', normal.dot(v) >= 0 for convex shapes Point p is Inside “Wrong side” No general rule(?), depends on shape 0-Distance If Distance(p,v)<halfTolerance 00Distance DistanceToIn(p,v) return the exact distance (double) to the surface of the shape for given point p and direction v. Normal is pointing outwards shape.

8 Conventions. DistanceToOut(p,v) Geant4USolidsVecGeomROOT Point p is Inside No intersection Between shape and ray(p+v*t), “wrong result” Infinity, as default value Point p is Inside Intersection Between shape and ray(p+v*t) Distance Point p is on Surface0, if 'leaving' shape, normal.dot(v) >= 0 for convex shape DistanceTo next boundary, if 'entering' shape, normal.dot(v) < 0 for convex shape 0, if 'leaving' shape, normal.dot(v) >= 0, for convex shape DistanceTo next boundary, if 'entering' shape, normal.dot(v) < 0 for convex shaper 0, if 'leaving shape' DistanceTo next boundary, if 'entering shape' 0, if 'leaving' shape, normal.dot(v) >= 0 for convex shape DistanceTo next boundary, if 'entering' shape,normal.dot(v) < 0 for convex shape Point p is Outside “Wrong side” No general rule(?), depends on shape 0-Distance If Distance(p,v)<halfTolerance 00Distance DistanceToOut(p,v) return the exact distance (double) to the surface of the shape for given point p and direction v. Normal is pointing outwards shape.

9 Conventions. SafetyFromOutside(p) Geant4USolidsVecGeomROOT Point p is Outside Safety Point p is on Surface 0000 Point p is Inside “Wrong side” 00-Safety SaferyFromOutside estimates isotropic distance to the surface of the shape from Outside. This must be either accurate or an underestimate.

10 ShapeTester update 1.Separate testing for different conventions for USolids and VecGeom. 2. Add error handling as in unit tests. 3.TestSurfacePoint : Add test for point on Surface for “0/Infinity” check for Distances. Before test was reporting error only if both DistanceToIn(p,v) and DistanceToOut(p,v) are not zero.

11 Conventions. SafetyFromInside(p) Geant4USolidsVecGeomROOT Point p is Inside Safety Point p is on Surface 0000 Point p is Outside “Wrong side” 00-Safety SaferyFromInside(p) estimates isotropic distance to the surface of the shape from Inside point p. This must be either accurate or an underestimate.


Download ppt "USolids meeting 01.06.2015. Conventions. DistanceToIn(p,v) Geant4USolidsVecGeomROOT Point p is Outside No intersection Between shape and ray(p+v*t) Infinity."

Similar presentations


Ads by Google