Re: Geometry classes

From: Rutger van der Eijk (r36@nikhef.nl)
Date: Fri Jun 26 1998 - 15:08:27 MEST


Hi Valery,

Thanks for this modification, I can surely use it. Actually what I would 
propose is to have is an even more 'fundamental' shape, from which all
'cylindrical shapes' should inherit. The shape I would like to have is 
'cylindrical' shape with 'arbitrary' cross-section. (TCYLI or something)

I think this could be implemented by explicitly specifying the 'SetPoints'
at contruction time. The shapes TTUBE, TCONE (TBRIK?) etc.. can then be
derived from this TCYLI. And it automatically enables the possibility to
make other 'cylindrical' shapes with a certain cross section (like
honeycombs, 'stars' etc...)

The 'honeycomb-like' shape is definitly something I would like to have
myself. At the moment I don't have time to develop it. (but I might have
later this year) Do you think this would be a good way to generalize the
classes?

Rutger van der Eijk.


On Sat, 20
Jun 1998, Valery Fine wrote:

> On 12 Jun 98 at 14:48, Rutger van der Eijk wrote:
> 
> 
> > 3) TELTU seems to be implemented as a normal cylinder, not as a
> > cylinder with elliptical cross section.
> 
> 
>   Just an idea:
> 
>   1. Rename the TTUBE class to TELSTU (may be ?)
>   2. Change the ctor of class:
> 
>      TTUBE::TTUBE(Text_t *name, Text_t *title, Text_t *material, Float_t rmin, Float_t rmax, Float_t dz
>                 ,Float_t aspect=1)
> 
>      adding one extra parameter as above:
> 
>   3. Add one extra data member and one method:
>      i.e instead of 
> 
>       class TTUBE : public TShape {
>  
>       protected:
>            Float_t fRmin;        // inside  radius
>            Float_t fRmax;        // outside raduis
> 
>              ....
>           [snip]
>              ....
>     }
> 
>      class TELTU : public TShape {
> 
>       protected:
>           Float_t fRmin;        // inside  the  ellipse  semi-axis   in  X
>           Float_t fRmax;        // outside the  ellipse  semi-axis   in  X
> 
>           Float_t fAspectRatio; // defines  (the ellipse semi-axis in Y)/(the ellipse semi-axis in X)
> 
> 
>              ....
>           [snip]
>              ....
>        public:
> 
>              ....
>           [snip]
>              ....
> 
>           virtual void    SetAspectRatio(Float_t factor=1)(fAspectRatio = factor;}
>           virtual Float_t GetAspectRatio()(return fAspectRatio;}
> 
> 
>              ....
>           [snip]
>              ....
>      }
> 
>   3. Change two lines of the method void TTUBE::SetPoints(Float_t *buff):
>      instead of:
> 
>             buff[indx+6*n] = buff[indx] = fRmin * fSiTab[j];
> 
>     write:
> 
>             buff[indx+6*n] = buff[indx] = fAspectRatio*fRmin * fSiTab[j];
> 
> 
> 
>   afterwards this class will be able to draw all kind of elliptic 
>   tube (the cylindrical one included too).  
> 
>   I've tried and it works very well.
> 
>   The corrections sent to ROOT team. In theory the same
>   could be done for all "cylindrical" classes ike 
> 
>           TPCone TCone, TCons etc and even for TSphe 
> 
>  (for TSphe two aspect rations should be introduced to draw ellipsoids).
> 
>   Hope this helps,
>                        Valery
> 
> 
> 
> 
>   
> =================================================================
> Dr. Valeri Faine (Fine)
>     -------------------          Phone: +1 516 344 7806
> Brookhaven National Laboratory   FAX  : +1 516 344 4206
> Bldg. 510A /STAR                 mailto:fine@bnl.gov
> Upton, New York, 11973-5000      http://nicewww.cern.ch/~fine
> USA
>                                  
> Dr. Valery Fine                  Telex : 911621 dubna su
>     -----------
> LCTA/Joint Inst.for Nuclear Res. Phone : +7 09621 6 40 80
> 141980 Dubna, Moscow region      Fax   : +7 09621 6 51 45
> Russia                           mailto:fine@main1.jinr.dubna.su                              
> 
> 



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:34:34 MET