Xraytrace documentation

raytracing software for x-ray standing wave calculations

User Tools

Site Tools


sample_geometry

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
sample_geometry [2018/01/24 16:56]
185.62.108.185
sample_geometry [2018/01/24 18:19] (current)
89.103.122.186
Line 63: Line 63:
 {{ :​objects.png?​400 |}} {{ :​objects.png?​400 |}}
  
 +
 +As the voxel based mesh features the staircasing effect, we need to handle the surface normal calculation carefully, while evaluating interaction of the ray with the object. Use of some particular method is chosen in the main parameter file, using e.g. this command
  
 <​code>​ <​code>​
 INTERFACE_METHOD INTERFACE_METHOD
-integer+3
 </​code>​ </​code>​
  
-sets the surface/​interface ​normal ​calculation method, ​- simple weighing, 1 - RS2 - gradient ​based, 3 - minimal (single voxel). Simple ​weighting ​gives slightly wrong angles and should not be usedRS method provides ​local plane fitting, ​gradient ​method is an approximate method ​using gradient of material within ​the sampleminimal method ​only looks to adjacent voxels and therefore can only produce normals of individual voxel facesAll the averaging ​based methods may fail at large angles hitting edges of objects (where real staircased ​object ​normal is too much different from averaged one); if it fails algorithm automatically uses the minimal ​method ​for the particular reflection/​transmissionDefault value is 2.+which sets the crudest method significantly affected by staircasing. 
 + 
 +There are different ​surface normal ​evaluation methods implemented:​ if we use as the above command parametersimple weighting of the pixel neighbourhood is used. Regime ​means something more advancedhowever again based on weighting ​of the amount of material around the pixel where we do the evaluation. Regime 2 is most resistant to staircasingbeing based on pre-calculation of local neighbourhood ​gradient ​and then using this information as shown in the figure below. Finallyregime 3 means only local evaluation, searching for adjacent voxels and should be used only for rectangular objects. 
 + 
 +If the gradient ​based control method is used, it can be controlled further by local averaging area selection, using e.g. this directive:​ 
 +<​code>​ 
 +AVERAGE 
 +
 +</​code>​ 
 + 
 +The provided value is typically in range of 2-5, the higher value the smoother the object ​boundaries are. However, ​too much of smoothing can also remove some fine details. Note that gradient based method ​is precomputing ​the data at the calculation start, this can affect the computation time. 
 + 
 +{{ :normals.png?400 |}} 
  
  
sample_geometry.1516809414.txt.gz · Last modified: 2018/01/24 16:56 by 185.62.108.185