From: Bruce S. <bas...@nc...> - 2010-11-04 01:11:20
|
Not absolutely sure I understand the question, but if you can make the window (say) 600 by 600, and specify scene.range = 300, and then your coordinates are effectively pixel coordinates. Bruce Sherwood On Wed, Nov 3, 2010 at 5:54 PM, Danny Caballero <dan...@gm...> wrote: > Sorry to high jack this thread, but this might be a similar question. > Is there a way to specify sizes of things like curves in real space? > Like where the limits of the curve are fractions of the scene size in > pixels? > > I'm looking to create axes for HS students that can be drawn across > the scene regardless of the size of the objects in the scene. > > Thanks, > Danny > > On Wed, Nov 3, 2010 at 4:45 PM, Daπid <dav...@gm...> wrote: >> Another option, deppending on what do you exactly want, work in your >> SR but give all the coordinates to VPython in its own system. Create a >> function that convers from your CS to VP's one and the opposite one, >> and use them everywhere. >> >> That would be, nevertheless, messy and propense to bugs. >> >> >> On Wed, Nov 3, 2010 at 9:38 PM, Bruce Sherwood <bas...@nc...> wrote: >>> It can't be done. VPython insists on the coordinate system being a >>> right-handed coordinate system. What you can do is have y to the >>> right, z up, and x coming toward you, as in the following example: >>> >>> from visual import * >>> x = curve(pos=[(0,0,0), (1,0,0)], color=color.red) >>> y = curve(pos=[(0,0,0), (0,1,0)], color=color.green) >>> z = curve(pos=[(0,0,0), (0,0,1)], color=color.blue) >>> label(pos=x.pos[1], text='x') >>> label(pos=y.pos[1], text='y') >>> label(pos=z.pos[1], text='z') >>> scene.up = (0,0,1) >>> scene.forward = (-1,0,0) >>> >>> Bruce Sherwood >>> >>> 2010/11/3 Virgílio Bento <vir...@gm...>: >>>> Dear all, >>>> >>>> I'm trying to define a scene with the following axis (see attachment). >>>> >>>> >>>> How should i define the scene.up and the scene.forward to achieve this >>>> perspective? >>>> Tried several combinations but still haven't found the one. >>>> >>>> Thanks for your answer. >>>> >>>> Regards, Virgilio Bento >>>> >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Achieve Improved Network Security with IP and DNS Reputation. >>>> Defend against bad network traffic, including botnets, malware, >>>> phishing sites, and compromised hosts - saving your company time, >>>> money, and embarrassment. Learn More! >>>> http://p.sf.net/sfu/hpdev2dev-nov >>>> _______________________________________________ >>>> Visualpython-users mailing list >>>> Vis...@li... >>>> https://lists.sourceforge.net/lists/listinfo/visualpython-users >>>> >>>> >>> >>> ------------------------------------------------------------------------------ >>> Achieve Improved Network Security with IP and DNS Reputation. >>> Defend against bad network traffic, including botnets, malware, >>> phishing sites, and compromised hosts - saving your company time, >>> money, and embarrassment. Learn More! >>> http://p.sf.net/sfu/hpdev2dev-nov >>> _______________________________________________ >>> Visualpython-users mailing list >>> Vis...@li... >>> https://lists.sourceforge.net/lists/listinfo/visualpython-users >>> >> >> ------------------------------------------------------------------------------ >> Achieve Improved Network Security with IP and DNS Reputation. >> Defend against bad network traffic, including botnets, malware, >> phishing sites, and compromised hosts - saving your company time, >> money, and embarrassment. Learn More! >> http://p.sf.net/sfu/hpdev2dev-nov >> _______________________________________________ >> Visualpython-users mailing list >> Vis...@li... >> https://lists.sourceforge.net/lists/listinfo/visualpython-users >> > |