Hi
Is there any way of specifying an orthonormal coordinate system for a
TView. When I use X3D it seems to be true, but is that just some scaling
trick by hand or is there a nice method for 3d as opposed to the 2d histo
case ?
Cheers,
Peter
P.s : Added a simple test macro where I want a cube :
{
TCanvas *c1 = new TCanvas( "c1", "", 400, 200 );
TView *t1 = new TView();
t1->Draw();
fGeom = new TGeometry("geo","geo");
TBRIK *cube = new TBRIK("cube","cube","void", 50, 50, 50);
fGeom->Node("cube", "cube", "cube", 0, 0, 0);
fGeom->Draw();
}
:-) --------------------------------- )-:
|Peter H L Christiansen aka PAN @ NBI |
|EMAIL : pchristi@nbi.dk |
|OFFICE : Tb1 @ NBI |
|PHONE : 353 25269 <- New!! |
|SNAIL : Sdr. Fasanvej 14 ST 2000 F |
|PHONE : 38 872042 |
:-D --------------------------------- \-:
On Fri, 15 Sep 2000, Rene Brun wrote:
> Hi Yannick,
> The macro iso.C below shows two methods to achieve what you want.
>
> Rene Brun
>
> //-------------------------iso.C
> {
> //method1. compute ymax to get a commensurate range
> // 1 pixel must correspond to the same range in x and y
> TCanvas c1("c1","c1",10,10,800,600);
> Float_t xmin = 0;
> Float_t xmax = 20;
> Float_t ymin = -2;
> Int_t npx = gPad->GetWw();
> Int_t npy = gPad->GetWh();
> Float_t ymax = ymin + (xmax-xmin)*npy/npx;
> TH2F h("h","",20,xmin,xmax,20,ymin,ymax);
> h.Draw();
> TArc a1(6,4,6);
> a1.Draw();
>
> //method2. set a square virtual canvas size in a non-square canvas
> TCanvas c2("c2","c2",200,50,800,600);
> c2.SetCanvasSize(700,700);
> c2.DrawFrame(0,0,20,20);
> TArc a2(10,10,10);
> a2.Draw();
> }
>
> Patois Yannick wrote:
> >
> > Hi,
> >
> > When drawing a 2D plot, I have difficulties to impose exact
> > orthonormality of the axis. I know I certainly can achieve this by
> > computing length of each axis, plus looking at the pad geometry and then
> > putting the scales accordingly...
> >
> > Is there some fast and simple way to force orthonormality, for example
> > by forcing the Y axis to conform to the setting of the X axis in a
> > given Pad size ?
> >
> > thanx for any help.
> >
> > Yannick
> >
> > --
> > _/ Yannick Patois _________________ Address (home) __________________
> > | irc(undernet): Garp on #france25+ | La Villa des Sciences |
> > | email : patois@ganil.fr | 12, avenue de Cambridge |
> > | http://garp.feelingsurfer.net/ | 14200 Herouville-Saint-Clair |
> > | Tel/Fax-home:+33 (0)2 31 94 50 32 | FRANCE |
>
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:32 MET