А не ввести ли мне ещё один тэг, что-нибудь вроде мракограммирование в добавок к алгорифметике? А то клиенты кустятся и зреют, на всех не хватает. Из хороших новостей - меня активно процитировали в прошлом году, а я и не заметил! Из плохих новостей -
Q: What if I want to make a new geometry?
A: Write a new unit according to the geometry specification, as written in the Programmers Guide.
Q: But I have that all-important supeh-hyper-ultra-boloid that absolutely must be intersected with cones, planes and cylinders from standard geometry2D...
A: OK, then You can have this nice step-by-step list of things that must be changed in geometry2D:
- Define a new border type in params.inc
- Make sure You put all relevant local parameters in geometry2D.inc and initialize them to meaningful values in init_geometry
- Add a new section in read_geometry to be able to read and check the input from the model definition file
- Add a new section in set_cell_loc to establish center of cell locations
- Add a new section in get_cell_vol (and possibly a helper subroutine) to calculate the volume inclosed between Your surfaces and any other that You may require (like planes)
- If You are going to have solid cells, You also need to edit get_cell_sur to provide cell surface area
- If Your surfaces require a specific ray-casting scheme, add it to get_ray_props
- Add a new section in get_ray_start, first to locate arbitrary point in relation to the new surface set, then to detect and deal with any possible tricky situation, like having a ray that merely touches or is parallel to Your surfaces.
- Finally, add a new ray-surface intersection finder to the trace subroutine.
Here, all done! See, nothing too difficult? Now go and do it!