Re: Fwd: Vpython -> define perspective.
Danny Caballero <[email protected]>
| Newsgroups | gmane.comp.python.visualpython.user |
|---|---|
| Message-ID | <[email protected]> |
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 <[email protected]> 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 <[email protected]> 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 <[email protected]>: >>> 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 >>> [email protected] >>> 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 >> [email protected] >> 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 > [email protected] > https://lists.sourceforge.net/lists/listinfo/visualpython-users > ------------------------------------------------------------------------------ The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev _______________________________________________ Visualpython-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/visualpython-users