From: jon s. <js...@so...> - 2003-01-03 01:44:04
|
Thanks for your help! Attached is the kind of image I'm working on (its the decimal system visualized). Is there a way of adjusting the foreshortening? When I zoom closer to the nearest point (the 0) it disappears (perhaps I'm too close to the camera). I'd like to see more of the single-digit integers and be able to see detail a few orders of magnitude further. I think if I could have the camera "way back" but telescope in to the object of interest, the foreshortening would be reduced..? ------------------------------------------ Jonathan Schull, Ph.D. Sc...@Di... <mailto:Sc...@Di...> http://radio.weblogs.com/0104369/stories/2002/09/24/JonathanSchullOnOnePage. html <http://radio.weblogs.com/0104369/stories/2002/09/24/JonathanSchullOnOnePage .html> 36 Brunswick St., Rochester NY 14607 585-738-6696 cell and v-mail 585-242-9497 landline 978-246-0487 fax ------------------------------------------ > -----Original Message----- > From: vis...@li... > [mailto:vis...@li...]On Behalf Of > Bruce Sherwood > Sent: Wednesday, January 01, 2003 8:20 PM > To: vis...@li... > Subject: Re: [Visualpython-users] controlling zooming > > > Jon Schull is correct; there is something wrong with autoscaling when > scene.forward is not along z. Thanks for reporting this. The autoscaling > seems to be based on the view seen with the default scene.forward rather > than the actual scene.forward. > > The other problem he reported, "When I fiddle with scene.range, the image > gets dim as if the lights have been turned down," was basically due to the > fact that the blocks lie along the z axis and so only the single > front face > is directly illuminated. The color problem was compounded by setting RGB > values to a maximum of 255 rather than 1, which gives strange results. The > version of the program below resets the RGB values to be within the valid > parameter range. One might also change the direction of the > lighting so that > the side faces of the blocks are directly illuminated. (When running the > program, click to advance.) > > from visual import * > > ##"jon schull" <js...@so...> > ##This program builds blocks out into space correctly, but it > automatically > ##"zooms" way out (too far out) about midway through. > > c=[] > def init(): > for i in range(10): > c.append((0,0,0)) > > c[0]=[255,255,255] > c[1]=[255,153,51] > c[2]=[102,102,153] > c[3]=[255,0,102] > c[4]=[102,102,153] > c[5]=[255,102,0] > c[6]=[128,0,128] > c[7]=[255,255,0] > c[8]=[51,51,153] > c[9]=[255,0,102] > > for i in range(10): > for j in range(3): > c[i][j] = c[i][j]/255.0 > > for each in c: > for i in (0,1,2): > each[i]=each[i]/255. > scene.forward=[0.5,-0.5,-1] > scene.range=10 ## added to avoid the autoscaling problem > > init() > > def tenblocks(firstblock=0): > for i in range(10): > b = box(color=c[i],pos=(0,0,-firstblock + 10 -i)) > scene.mouse.getclick() > > def ShowUpTo(Number=50): > Tens=Number/10 > for i in range(Tens): > tenblocks(firstblock=i*10) > > ShowUpTo(Number=100) > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |