RE: Display problem of a model in flair and simplegeo

From: Chris Theis <Christian.Theis_at_cern.ch>
Date: Thu, 14 Jun 2012 14:00:20 +0000

Hi Walker,

the reason for this is related to a mathematical detail of computer vision. If you’re interested then please see the explanation below:

In CG you have to convert 3D world coordinates into 2D screen coordinates. You do this by applying a camera transformation matrix to all objects that are located within what is called a “view frustrum”. You can imagine this the following way: the camera is located at one point and looks into a certain direction, with the view rays opening up a pyramid towards infinity. However, you cannot visualize until infinity and therefore you have to restrict this pyramid by defining a so called near-plane and a far-plane which cut out part of this view pyramid – and that’s the frustrum. Everything outside those near and far planes is clipped.

In order to make sure that all visible objects are visualized SimpleGeo adapts those near and far planes automatically depending on the bounding sphere of the geometry. However, planes by themselves are half-spaces and as such they are by definition unbound in 2 dimensions. Therefore, I exclude them when I calculate the bounding sphere. All planes which happen to be within the near and far plane will be shown. However, all those bodies, or even parts of them, which are outside the camera clipping planes will not be visible even though you selected them.

This could be circumvented to a certain extent if the clipping planes are by default set to very large distances. However, this on one hand would actually distort the 3D->2D screen transformation and result in ugly images and on the other hand result in a loss of accuracy in depth calculations.

Cheers
Chris
----------------------------------------------------------------------------------------
Chris Theis
CERN/DGS-RP - European Organization for Nuclear Research
1211 Geneva 23, Switzerland
Phone: +41 22 767 8069 Office: 892-2A-015
e-mail: Christian.Theis@cern.ch<mailto:Christian.Theis@cern.ch> www: http://www.cern.ch/theis
-----------------------------------------------------------------------------------------

From: walker [mailto:wdx456_at_mail.ustc.edu.cn]
Sent: 14 June 2012 14:08
To: Chris Theis
Cc: fluka-discuss_at_fluka.org
Subject: Re: Display problem of a model in flair and simplegeo

Thanks, Chris! That’s the problem.

Besides, I’ll talk about another related problem:
There are six bodies which make up of R1. In SimpleGeo, one can observe some body by click on it in the CSG Tree window.
I select B1 and it appears on the right side and so are B3, B4 and B6. However, when it comes to B2 and B5, nothing can be seen. What’s the reason of this?
[cid:image002.png_at_01CD4A44.E80C6390] [cid:image003.png_at_01CD4A44.E80C6390]
                         B1 B2



Cheers
Walker

发件人: Chris Theis [mailto:Christian.Theis_at_cern.ch]<mailto:[mailto:Christian.Theis_at_cern.ch]>
发送时间: 2012年6月14日 17:45
收件人: walker; fluka-discuss_at_fluka.org<mailto:fluka-discuss_at_fluka.org>
主题: RE: Display problem of a model in flair and simplegeo

Dear Walker,

I just had a quick look but I think the problem that you are facing is that the intersection of B5 & B6 is nil and thus, neither SimpleGeo nor Flair have anything to display for region 1. B6 is a cylinder parallel to the Y axis with a Z coordinate of 514, whereas B5 is a plane with a normal pointing (almost) in Z direction while it has a Z coordinate of -252.5. Therefore, it won’t intersect your cylinder.

Cheers
Chris
----------------------------------------------------------------------------------------
Chris Theis
CERN/DGS-RP - European Organization for Nuclear Research
1211 Geneva 23, Switzerland
Phone: +41 22 767 8069 Office: 892-2A-015
e-mail: Christian.Theis@cern.ch<mailto:Christian.Theis@cern.ch> www: http://www.cern.ch/theis
-----------------------------------------------------------------------------------------

From: owner-fluka-discuss_at_mi.infn.it<mailto:owner-fluka-discuss_at_mi.infn.it> [mailto:owner-fluka-discuss_at_mi.infn.it]<mailto:[mailto:owner-fluka-discuss_at_mi.infn.it]> On Behalf Of walker
Sent: 14 June 2012 01:53
To: fluka-discuss_at_fluka.org<mailto:fluka-discuss_at_fluka.org>
Subject: Display problem of a model in flair and simplegeo


Dear FLUKA experts and users,

I’ve got a model whose input is as follows(attachment):

****************************************************************
*Model size: 3 Regions, 13 Bodies

*Geometry input

GEOBEGIN COMBNAME

*title card
    0 0 display problem input

*FLUKA bodies
  PLA B1 0.05814483 -0.99830816 0.00000000 0.02907241
                        -0.49915408 0.00000000
  PLA B2 -0.86514825 0.00000000 0.50151621 514.99895433
                         0.00000000 -298.53880388
  YCC B3 514.50000003 -352.47813940 123.50000000
  PLA B4 0.05814483 0.99830816 0.00000000 0.02907241
                  0.49915408 0.00000000
  PLA B5 0.23520774 0.00000000 0.97194512 -61.10416241
                  0.00000000 -252.49973688
  YCC B6 514.50000003 -352.47813940 148.50000000
  XYP B7 -345.00000000
  XYP B8 -480.00000000
  XZP B9 -36.00000000
  YZP B10 356.00000000
  XZP B11 36.00000000
  YZP B12 442.00000000
  SPH B13 0.00000000 0.00000000 0.00000000 50000.00000000

  END

*FLUKA regions
  R1 5 -B1+B5+B6-B3-B4-B2
 R2 5 +(+B7-B8-B9-B10+B11+B12) -(-B1+B5+B6-B3-B4-B2)
  R3 5 +B13 -(+B7-B8-B9-B10+B11+B12)

  END
GEOEND

*assign target material
ASSIGNMA BERYLLIU R1
*assign void material
ASSIGNMA VACUUM R2
*assign blackhole material
ASSIGNMA BLCKHOLE R3
**********************************************************************

When I import the input file into simplegeo or open it with flair and use the ‘Geometry Editor’ function, the region R1 can’t be displayed.
R2 and R3 are normal.

The following picture is screenshot of R1 in CAD software.
[cid:image004.png_at_01CD4A44.E80C6390]

Does anyone have any idea of what’s the problem?


Yours,
Walker

image002.png
image003.png
image004.png
Received on Fri Jun 15 2012 - 09:49:05 CEST

This archive was generated by hypermail 2.2.0 : Fri Jun 15 2012 - 09:49:06 CEST