You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(4) |
Jul
(1) |
Aug
|
Sep
(15) |
Oct
(32) |
Nov
(35) |
Dec
(48) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(46) |
Feb
(22) |
Mar
(65) |
Apr
(49) |
May
(22) |
Jun
(29) |
Jul
(51) |
Aug
(34) |
Sep
(32) |
Oct
(46) |
Nov
(30) |
Dec
(32) |
2002 |
Jan
(48) |
Feb
(4) |
Mar
(20) |
Apr
(28) |
May
(13) |
Jun
(34) |
Jul
(51) |
Aug
(15) |
Sep
(15) |
Oct
(35) |
Nov
(15) |
Dec
(20) |
2003 |
Jan
(31) |
Feb
(111) |
Mar
(41) |
Apr
(28) |
May
(36) |
Jun
(29) |
Jul
(27) |
Aug
(29) |
Sep
(47) |
Oct
(28) |
Nov
(7) |
Dec
(26) |
2004 |
Jan
(44) |
Feb
(9) |
Mar
(17) |
Apr
(26) |
May
(58) |
Jun
(13) |
Jul
(44) |
Aug
(64) |
Sep
(30) |
Oct
(11) |
Nov
(21) |
Dec
(28) |
2005 |
Jan
(29) |
Feb
(11) |
Mar
(11) |
Apr
(22) |
May
(85) |
Jun
(46) |
Jul
(17) |
Aug
(18) |
Sep
(14) |
Oct
(22) |
Nov
(1) |
Dec
(45) |
2006 |
Jan
(20) |
Feb
(36) |
Mar
(18) |
Apr
(24) |
May
(21) |
Jun
(48) |
Jul
(23) |
Aug
(20) |
Sep
(10) |
Oct
(41) |
Nov
(46) |
Dec
(40) |
2007 |
Jan
(40) |
Feb
(20) |
Mar
(13) |
Apr
(6) |
May
(24) |
Jun
(31) |
Jul
(30) |
Aug
(11) |
Sep
(11) |
Oct
(10) |
Nov
(56) |
Dec
(64) |
2008 |
Jan
(64) |
Feb
(22) |
Mar
(63) |
Apr
(28) |
May
(25) |
Jun
(36) |
Jul
(11) |
Aug
(9) |
Sep
(14) |
Oct
(41) |
Nov
(46) |
Dec
(130) |
2009 |
Jan
(95) |
Feb
(41) |
Mar
(24) |
Apr
(35) |
May
(53) |
Jun
(67) |
Jul
(48) |
Aug
(48) |
Sep
(86) |
Oct
(75) |
Nov
(64) |
Dec
(52) |
2010 |
Jan
(57) |
Feb
(31) |
Mar
(28) |
Apr
(40) |
May
(25) |
Jun
(42) |
Jul
(79) |
Aug
(31) |
Sep
(49) |
Oct
(66) |
Nov
(38) |
Dec
(25) |
2011 |
Jan
(29) |
Feb
(18) |
Mar
(44) |
Apr
(6) |
May
(28) |
Jun
(31) |
Jul
(36) |
Aug
(24) |
Sep
(30) |
Oct
(23) |
Nov
(21) |
Dec
(27) |
2012 |
Jan
(14) |
Feb
(11) |
Mar
(2) |
Apr
(48) |
May
(7) |
Jun
(32) |
Jul
(22) |
Aug
(25) |
Sep
(31) |
Oct
(32) |
Nov
(21) |
Dec
(17) |
2013 |
Jan
(44) |
Feb
(27) |
Mar
(3) |
Apr
(1) |
May
|
Jun
|
Jul
(3) |
Aug
(4) |
Sep
(1) |
Oct
(7) |
Nov
(5) |
Dec
(5) |
2014 |
Jan
|
Feb
|
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(2) |
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
(7) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Bruce S. <Bru...@nc...> - 2008-03-06 23:09:09
|
If you want to create an object that is not already part of VPython, and cannot be constructed by a combination of existing objects, then you'll need to use the low-level "faces" object which is a list of triangles and normals to those triangles. It is of course tedious to build a cup this way, but that's the only way to do it at present. You might reduce the labor by using some 3D modeling program to create a cup, export a description in terms of primitive elements, and write a Python program to read that description and output a file containing appropriate "faces" parameters. Bruce Sherwood Mariano Di Felice wrote: > Hi at all, > my question is: is there a way for draw (speedy) an image into a 3D > vpython object? > > I would like do draw an image up to cup of tea ( for example ) and view it. > Is it possible? > > thx very much > bye > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: Bruce S. <Bru...@nc...> - 2008-03-06 23:00:43
|
For a complete list of vector-related functions, of which "cross" is just one, see the section on vectors in the Visual reference manual on the Help menu. Bruce Sherwood Steve Spicklemire wrote: > Yes! See crossproduct.py in the examples directory of vpython. > > cvector = cross(avector,bvector) > > -steve > > > On Mar 6, 2008, at 10:21 AM, Park, Nicholas wrote: > > >> Hello everybody, >> >> Sorry for what is probably a basic question... is there an easy way >> to do a vector cross product in python, besides doing it explicitly >> in terms of components? >> >> Thanks, >> Nicholas Park >> Physics Dept. >> Greenhill School >> >> >> ---------------------------------------------------------------------- >> --- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2008. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Visualpython-users mailing list >> Vis...@li... >> https://lists.sourceforge.net/lists/listinfo/visualpython-users >> >> > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: Mariano Di F. <mar...@gm...> - 2008-03-06 17:23:37
|
Hi at all, my question is: is there a way for draw (speedy) an image into a 3D vpython object? I would like do draw an image up to cup of tea ( for example ) and view it. Is it possible? thx very much bye |
From: Steve S. <st...@sp...> - 2008-03-06 15:25:41
|
Yes! See crossproduct.py in the examples directory of vpython. cvector = cross(avector,bvector) -steve On Mar 6, 2008, at 10:21 AM, Park, Nicholas wrote: > Hello everybody, > > Sorry for what is probably a basic question... is there an easy way > to do a vector cross product in python, besides doing it explicitly > in terms of components? > > Thanks, > Nicholas Park > Physics Dept. > Greenhill School > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users > |
From: Park, N. <pa...@gr...> - 2008-03-06 15:21:29
|
Hello everybody, Sorry for what is probably a basic question... is there an easy way to do a vector cross product in python, besides doing it explicitly in terms of components? Thanks, Nicholas Park Physics Dept. Greenhill School |
From: Rob S. <sa...@ph...> - 2008-02-25 11:08:28
|
Here is some information on an upcoming conference that might be of interest to some on this mailing list. (Details below) It would great to have more contributed poster presentations involving VPython. rob salgado http://www.grc.org/programs.aspx?year=2008&program=physres http://www.opensourcephysics.org/GRC/index.html (more info) http://www.opensourcephysics.org/GRC/program.html (program schedule as a PDF) http://www.opensourcephysics.org/GRC/support.html (possible financial support) PHYSICS RESEARCH AND EDUCATION Computation And Computer-Based Instruction June 8-13, 2008 Bryant University Smithfield, RI Chairs: Bradley S. Ambrose & Wolfgang Christian Vice Chairs: Enrique J. Galvez & Chandralekha Singh Application Deadline: May 18, 2008. The 2008 Gordon Research Conference on Physics Research and Education, the fifth in this series of conferences, will focus on the expanding and deepening role of computers in physics research and instruction, with particular emphasis on undergraduate education. The purpose of this conference is to survey how computational physics is currently being used, to identify problems where computation helps students understand key physics concepts, and to assess the effectiveness of computational-physics instruction. The conference will highlight current efforts to incorporate computational physics and other computer-based methods (such as simulations and visualizations) into the physics classroom. The format of the conference - which will include invited plenary sessions, contributed poster presentations, and generous amounts of unscheduled time for informal discussions - is specially designed to promote dialogue and cross-fertilization of ideas between educators and researchers at the forefront of their fields, including researchers in physics education. College and university faculty, research associates (postdocs), computational- physics textbook authors, curriculum and educational software developers, and graduate and undergraduate students are invited to participate. |
From: P H B. <P.H...@bh...> - 2008-02-25 10:11:41
|
You do not say what units you are using. When doing problems of this sort it is sometimes helpful to use "normalised" units, so as to keep the numbers manageable, and not to have too many powers of 10 floating around. For example, when dealing with the motion of planets in the solar system, I use astronomical units for distance and years for time and the solar mass as the unit of mass rather than SI units. Regards Peter In message <47B...@ma...> Matthew Kohlmyer <mko...@ma...> wrote: > Is it the case that gcurve in VPython 3.2.11 cannot deal with a number > greater than approximately 3e38? I was writing a program that plots the > kinetic and potential energies of a binary star system and found that > the energy plots on the graph blew up when they reached this value. > I've tried it on two different computers and saw the same thing, so I > don't think it's a graphics driver issue. I did not have this problem > on a computer running 4.beta26. > > One of our TAs pointed out that this might have something to do with > handling 128 bit numbers--in fact, 2^128 = 3.4e38. Is there a connection? > > If this is the case, why does gvbars have no problems with such large > numbers? > > Sorry if I'm rehashing a previously discussed issue. > > Matt > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Visualpython-users mailing list > Vis...@li... > https://lists.sourceforge.net/lists/listinfo/visualpython-users -- Peter Borcherds |<mailto:P.H...@bh...> |phone 0044 (0)121 475 3029 |
From: Matthew K. <mko...@ma...> - 2008-02-21 22:01:14
|
Is it the case that gcurve in VPython 3.2.11 cannot deal with a number greater than approximately 3e38? I was writing a program that plots the kinetic and potential energies of a binary star system and found that the energy plots on the graph blew up when they reached this value. I've tried it on two different computers and saw the same thing, so I don't think it's a graphics driver issue. I did not have this problem on a computer running 4.beta26. One of our TAs pointed out that this might have something to do with handling 128 bit numbers--in fact, 2^128 = 3.4e38. Is there a connection? If this is the case, why does gvbars have no problems with such large numbers? Sorry if I'm rehashing a previously discussed issue. Matt |
From: Bruce S. <Bru...@nc...> - 2008-02-18 05:09:08
|
Brad Longo has kindly provided rpm's for the Fedora 7 flavor of Linux, now hosted at vpython.org. Go to the Linux download page. Bruce Sherwood |
From: Bruce S. <Bru...@nc...> - 2008-02-16 16:08:01
|
Rob Salgado has done a lot and also cataloged many sites where you might look for such a program. Here is his link (which is also available in the "Contributed" section at vpython.org): http://www.physics.syr.edu/~salgado/software/vpython Also see the "Lecture Materials" section of http://www4.ncsu.edu/~rwchabay/mi I don't however happen to know of an example quite like the one you imagine. There's a vaguely related program at the second site mentioned above, 22_Faraday-magnet.py, which illustrates the curly electric field surrounding a region where there is a time-varying magnetic field due to a moving magnet. The program 13_E_point_charge.py lets you drag an electric charge around and see the change in the electric field everywhere. I'm not sure what you mean by "But it is hard to give up on thinking about the gravity equations as a set of nested for loops iterating over arrays of vectors." The stars.py example program works by calculating the net force on a star due to all the other stars, updating the momentum of that star after a short time interval dt (final momentum = initial momentum + net_force*dt), and updating the position of that star using the final velocity to approximate the average velocity in that short time interval. What's a bit unusual about stars.py is using numeric arrays to handle N stars in parallel, where the momentum and position updates take place on arrays N stars wide. (stars.py also checks for mergers and carries them out, conserving momentum in the merger process.) Bruce Sherwood Doug Mair wrote: > I'm new to Python and VPython, I'm impressed with what I've seen so far. > > Does anyone know of a Magnet simulation in Python? > > I would like to have bar magnets which would attract each other by their > North / South poles. > > It would be cool to have them glued in position or able to move them around > on a surface. That way you can move one magnet around and see how the > others react to the one being dragged around. > > I've been looking through the stars.py for some hints on making this > program. > > Coming from C#, I really love the fact that the python equations for gravity > look very much like what I find on WikiPedia. But it is hard to give up on > thinking about the gravity equations as a set of nested for loops iterating > over arrays of vectors. > > > Thanks for any help, > Doug |
From: Doug M. <dou...@gm...> - 2008-02-16 03:29:26
|
I'm new to Python and VPython, I'm impressed with what I've seen so far. Does anyone know of a Magnet simulation in Python? I would like to have bar magnets which would attract each other by their North / South poles. It would be cool to have them glued in position or able to move them around on a surface. That way you can move one magnet around and see how the others react to the one being dragged around. I've been looking through the stars.py for some hints on making this program. Coming from C#, I really love the fact that the python equations for gravity look very much like what I find on WikiPedia. But it is hard to give up on thinking about the gravity equations as a set of nested for loops iterating over arrays of vectors. Thanks for any help, Doug |
From: Bruce S. <Bru...@nc...> - 2008-02-13 21:44:29
|
Visual 4.beta26 for Windows and Linux available at sourceforge (see "Recent developments" at vpython.org) This addresses a problem in Windows Vista in which there could be a two-minute freeze on a label object. It is possible the problem is still present in reduced form, with this freeze happening only the first time you use the new software; reports from Vista users would be helpful. This package includes much enhanced documentation on what is required for a developer to build Visual 4 on Windows and Mac. Some of this documentation may be of interest to Linux users because of the details given concerning library dependencies. Bruce Sherwood |
From: Nathaniel B. <fla...@ho...> - 2008-02-13 03:17:03
|
Can someone give me instructions on installing vpython on Leopard Xcode 3.0. Thanks Nat _________________________________________________________________ Connect and share in new ways with Windows Live. http://www.windowslive.com/share.html?ocid=TXT_TAGHM_Wave2_sharelife_012008 |
From: Bruce S. <Bru...@nc...> - 2008-02-09 16:56:15
|
With the help of Martin Costabel, I've managed to build the beta version of Visual on Mac OSX. The details are in the file MAC-OSX.txt in CVS at sourceforge.net. There are significant bugs which show up when running the example programs: 1) The following sequence crashes if the object is a label, but not with other objects: obj = label(text='hello') obj.visible = 0 obj = 35 The implication is that the label destructor fails on Mac (works okay on Windows and Linux). The rule is that if you make an object invisible, then reassign the only name for that object (obj = 35), Python is free to destroy the object and reuse the memory, because there is no longer any way for your program to get at that object. The only example program this bug affects is controlstest.py. 2) rotate(v, angle=something, axis=something) crashes. This free function is in vector.hpp. This affects stonehenge.py. The form v.rotate(angle=something, axis=something) works fine. This is in vector.cpp. Note that in wrap_vector.cpp there are 5 different references to rotate. One wonders whether this is a Boost problem? Works fine on Windows and Linux. 3) Programs that append to a faces object crash (for example, faces_heightfield.py, graphs that use gvbars or ghistogram). No problem on Windows and Linux, and no problem with faces_cone.py, which does not use append. 4) A non-fatal bug is that orbits.py and stars.py have dim or strange lighting. Because these bugs are serious, I haven't made a new tarball for Linux/Unix. But it seemed appropriate to make a status report. Bruce Sherwood |
From: anish m. <ani...@gm...> - 2008-02-07 11:36:07
|
From: Ron A. <rr...@ro...> - 2008-02-07 02:00:44
|
bre...@un... wrote: > > Interesting and a nice "refactoring". Thanks :-) > I just started with vPython (but already know Python somewhat) and > assumed that to create groups one would derive classes from frame, as > shown. It seems to work, but is this not preferred/robust? > > import visual as v > > class Wheelset(*v.frame*): > > def __init__(self, xPos, whlRad=0.5, /etc/): > > *v.frame.__init__(self,* pos=(xPos,whlRad,0.0)*)* > > v.cylinder(*frame=self*, pos=(0,0,-0.5*axleLength), > axis=(0.0, 0.0, axleLength), radius=axlRad) > etc When I tried a variation of the above with the Head() object, the class color attribute was overwritten. The defaults could be moved to within the __init__ method, but then you may have the opposite problem of overwriting a frame attribute or method without knowing it. So I think if there are a lot of methods or attributes, using a container obj makes it easier to avoid name clashes. But it looks like, either way is ok. Ron |
From: <bre...@un...> - 2008-02-06 22:20:50
|
Interesting and a nice "refactoring". I just started with vPython (but already know Python somewhat) and assumed that to create groups one would derive classes from frame, as shown. It seems to work, but is this not preferred/robust? import visual as v class Wheelset(v.frame): def __init__(self, xPos, whlRad=0.5, etc): v.frame.__init__(self, pos=(xPos,whlRad,0.0)) v.cylinder(frame=self, pos=(0,0,-0.5*axleLength), axis=(0.0, 0.0, axleLength), radius=axlRad) etc Ron Adam <rr...@ro...> Sent by: vis...@li... 07/02/2008 09:04 AM To vis...@li... cc pub...@ci... Subject Re: [Visualpython-users] Visual Python Help Kailas Narendran wrote: > > As you can see from the code, for some reason the rotation that's > supposed to happen about the long axis of the box doesn't. the strange > thing is that the other ones work ok, so I'm not sure what I'm doing > wrong. > > I've attached the code if you want to try and run it. The problem is on > line 48. You'll notice that the arm doesn't follow the torso just yet, > which is ok. > > Any ideas? I played around with your program a bit and found it easier to group parts in frames. Attached is what I got so far. I think this will be easier for you to extend. Cheers, Ron ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________""" Apollo Body """ import wx from visual import * from math import pi class Hand(object): color = color.green radius = .25 def __init__(self, parent, pos): self.obj = frame(frame=parent, pos=pos) sphere(frame=self.obj, radius=self.radius, color=self.color) class ForeArm(object): color = color.blue axis = (1, 0, 0) elboaxis = (0, 1, 0) radius = .2 def __init__(self, parent, pos): self.obj = frame(frame=parent, pos=pos) cylinder(frame=self.obj, axis=self.axis, radius=self.radius, color=self.color) self.bendpos = 0.0 def position(self, bend): # Elbo bend bend = pi * .5 + bend * .50 # Reduce range anglediff = self.bendpos - bend self.obj.rotate(angle=anglediff, axis=self.elboaxis) self.bendpos = bend class UpperArm(object): color = color.blue axis = (1, 0, 0) radius = .2 def __init__(self, parent, pos): self.obj = frame(frame=parent, pos=pos) cylinder(frame=self.obj, axis=self.axis, radius=self.radius, color=self.color) self.rollpos = 0.0 self.pitchpos = 0.0 self.headingpos = 0.0 def position(self, heading, pitch, roll): # Arm point heading *= .50 # Reduce range anglediff = self.headingpos - heading self.obj.rotate(angle=anglediff, axis=(0, 0, 1)) self.headingpos = heading # Arm raise pitch *= .50 # Reduce range anglediff = self.pitchpos - pitch self.obj.rotate(angle=anglediff, axis=(1, 0, 0)) self.pitchpos = pitch # Arm twist roll *= .90 # Reduce range anglediff = self.rollpos - roll self.obj.rotate(angle=anglediff, axis=(0, 1, 0)) self.rollpos = roll class Chest(object): color = color.red axis = (2, 0, 0) width = .75 def __init__(self, parent, pos): self.obj = frame(frame=parent, pos=pos) box(frame=self.obj, pos=(0,1,0), axis=self.axis, width=self.width, color=self.color) self.headingpos = 0.0 self.pitchpos = 0.0 self.yawpos = 0.0 def position(self, heading, pitch, yaw): # Turn Left or Right. heading *= .50 # Reduce range anglediff = self.headingpos - heading self.obj.rotate(angle=anglediff, axis=(0, 1, 0)) self.headingpos = heading # Bend forward or back. pitch *= .50 # Reduce range anglediff = self.pitchpos - pitch self.obj.rotate(angle=anglediff, axis=(1, 0, 0)) self.pitchpos = pitch # Lean left or right. yaw *= .10 # Reduce range anglediff = self.yawpos - yaw self.obj.rotate(angle=anglediff, axis=(0, 0, 1)) self.yawpos = yaw class Head(object): radius = .5 color = color.red def __init__(self, parent, pos): self.obj = frame(frame=parent, pos=pos) sphere(frame=self.obj, radius=self.radius, color=self.color) class Stomach(object): color = color.red width = .75 height = 1 length = 1.5 def __init__(self, parent, pos): self.obj = frame(frame=parent, pos=pos) box(frame=self.obj, width=self.width, height=self.height, length=self.length, color=self.color) # Build the body. # # Larger parts act as frames for smaller parts so # they rotate and move together. body = frame() stomach = Stomach(body, (0, 0, 0)) chest = Chest(stomach.obj, (0, .25, 0)) head = Head(chest.obj, (0, 2.25, 0)) upper_arm = UpperArm(chest.obj, (1.25, 1.5, 0)) fore_arm = ForeArm(upper_arm.obj, (1.25, 0, 0)) hand = Hand(fore_arm.obj, (1.5, 0, 0)) def position(utp, uty, uth, p, h, r, e): # Update body position. fore_arm.position(e) upper_arm.position(h, p, r) chest.position(uth, utp, uty) ID_ABOUT=101 ID_EXIT=110 class MainWindow(wx.Frame): def __init__(self,parent,id,title): wx.Frame.__init__(self,parent,wx.ID_ANY, title, size = (400,600)) #self.control = wx.TextCtrl(self, 1, style=wx.TE_MULTILINE) self.CreateStatusBar() # A Statusbar in the bottom of the window panel = wx.Panel(self, -1) # Setting up the menu. filemenu= wx.Menu() filemenu.Append(ID_ABOUT, "&About"," Information about this program") filemenu.AppendSeparator() filemenu.Append(ID_EXIT,"E&xit"," Terminate the program") # Creating the menubar. menuBar = wx.MenuBar() # Adding the "filemenu" to the MenuBar menuBar.Append(filemenu, "&File") # Create the sliders font1 = wx.Font(15, wx.NORMAL, wx.ITALIC, wx.NORMAL) # Uppor torso pitch hboxutp = wx.BoxSizer(wx.HORIZONTAL) utpl = wx.StaticText(panel, -1, "Upper Torso Pitch", (45, 25), style=wx.ALIGN_CENTRE) utpl.SetFont(font1) hboxutp.Add(utpl, 1, wx.EXPAND) self.UpperTorsoPitch = wx.Slider(panel, -1, 0, -100, 100, wx.DefaultPosition, (10, -1), wx.SL_HORIZONTAL | wx.SL_LABELS) hboxutp.Add(self.UpperTorsoPitch,1,wx.EXPAND) # Upper torso yaw hboxuty = wx.BoxSizer(wx.HORIZONTAL) utyl = wx.StaticText(panel, -1, "Upper Torso Yaw", (45, 25), style=wx.ALIGN_CENTRE) utyl.SetFont(font1) hboxuty.Add(utyl, 1, wx.EXPAND) self.UpperTorsoYaw = wx.Slider(panel, -1, 0, -100, 100, wx.DefaultPosition, (10, -1), wx.SL_HORIZONTAL | wx.SL_LABELS) hboxuty.Add(self.UpperTorsoYaw,1,wx.EXPAND) # Upper torso heading hboxuth = wx.BoxSizer(wx.HORIZONTAL) uthl=wx.StaticText(panel, -1, "Upper Torso Heading", (45, 25), style=wx.ALIGN_CENTRE) uthl.SetFont(font1) hboxuth.Add(uthl, 1, wx.EXPAND) self.UpperTorsoHeading = wx.Slider(panel, -1, 0, -100, 100, wx.DefaultPosition, (10, -1), wx.SL_HORIZONTAL | wx.SL_LABELS) hboxuth.Add(self.UpperTorsoHeading,1,wx.EXPAND) # arm pitch hboxuap = wx.BoxSizer(wx.HORIZONTAL) uapl = wx.StaticText(panel, -1, "Upper Arm Roll", (45, 25), style=wx.ALIGN_CENTRE) uapl.SetFont(font1) hboxuap.Add(uapl, 1, wx.EXPAND) self.UpperArmPitch = wx.Slider(panel, -1, 0, -100, 100, wx.DefaultPosition, (10, -1), wx.SL_HORIZONTAL | wx.SL_LABELS) hboxuap.Add(self.UpperArmPitch, 1, wx.EXPAND) # Upper arm yaw hboxuay = wx.BoxSizer(wx.HORIZONTAL) uayl = wx.StaticText(panel, -1, "Upper Arm Yaw", (45, 25), style=wx.ALIGN_CENTRE) uayl.SetFont(font1) hboxuay.Add(uayl,1,wx.EXPAND) self.UpperArmYaw = wx.Slider(panel, -1, 0, -100, 100, wx.DefaultPosition, (10, -1), wx.SL_HORIZONTAL | wx.SL_LABELS) hboxuay.Add(self.UpperArmYaw, 1, wx.EXPAND) # Upper arm heading hboxuah = wx.BoxSizer(wx.HORIZONTAL) uahl = wx.StaticText(panel, -1, "Upper Arm Heading", (45, 25), style=wx.ALIGN_CENTRE) uahl.SetFont(font1) hboxuah.Add(uahl, 1, wx.EXPAND) self.UpperArmHeading = wx.Slider(panel, -1, 0, -100, 100, wx.DefaultPosition, (10, -1), wx.SL_HORIZONTAL | wx.SL_LABELS) hboxuah.Add(self.UpperArmHeading, 1, wx.EXPAND) # Elbow angle hboxe = wx.BoxSizer(wx.HORIZONTAL) el = wx.StaticText(panel, -1, "Elbow Angle", (45, 25), style=wx.ALIGN_CENTRE) el.SetFont(font1) hboxe.Add(el, 1, wx.EXPAND) self.ElbowAngle = wx.Slider(panel, -1, 0, -100, 100, wx.DefaultPosition, (10, -1), wx.SL_HORIZONTAL | wx.SL_LABELS) hboxe.Add(self.ElbowAngle, 1, wx.EXPAND) vbox = wx.BoxSizer(wx.VERTICAL) vbox.Add(hboxutp, 1, wx.EXPAND) vbox.Add(hboxuty, 1, wx.EXPAND) vbox.Add(hboxuth, 1, wx.EXPAND) vbox.Add(hboxuap, 1, wx.EXPAND) vbox.Add(hboxuay, 1, wx.EXPAND) vbox.Add(hboxuah, 1, wx.EXPAND) vbox.Add(hboxe, 1, wx.EXPAND) wx.EVT_MENU(self, ID_ABOUT, self.OnAbout) wx.EVT_MENU(self, ID_EXIT, self.OnExit) wx.EVT_COMMAND_SCROLL(self.ElbowAngle, self.ElbowAngle.GetId(), self.OnAngleSliderChange) wx.EVT_COMMAND_SCROLL(self.UpperArmPitch, self.UpperArmPitch.GetId(), self.OnAngleSliderChange) wx.EVT_COMMAND_SCROLL(self.UpperArmYaw, self.UpperArmYaw.GetId(), self.OnAngleSliderChange) wx.EVT_COMMAND_SCROLL(self.UpperArmHeading, self.UpperArmHeading.GetId(), self.OnAngleSliderChange) wx.EVT_COMMAND_SCROLL(self.UpperTorsoHeading, self.UpperTorsoHeading.GetId(), self.OnAngleSliderChange) wx.EVT_COMMAND_SCROLL(self.UpperTorsoPitch, self.UpperTorsoPitch.GetId(), self.OnAngleSliderChange) wx.EVT_COMMAND_SCROLL(self.UpperTorsoYaw, self.UpperTorsoYaw.GetId(), self.OnAngleSliderChange) panel.SetSizer(vbox) panel.SetAutoLayout(1) self.SetMenuBar(menuBar) # Adding the MenuBar to the Frame content. self.Show(True) def OnAngleSliderChange(self, event): e = self.ElbowAngle.GetValue() p = self.UpperArmPitch.GetValue() h = self.UpperArmHeading.GetValue() r = self.UpperArmYaw.GetValue() utp = self.UpperTorsoPitch.GetValue() uty = self.UpperTorsoYaw.GetValue() uth = self.UpperTorsoHeading.GetValue() e= e / 100.0 * pi p= p / 100.0 * pi h= h / 100.0 * pi r= r / 100.0 * pi utp = utp / 100.0 * pi uty = uty / 100.0 * pi uth = uth / 100.0 * pi position(utp, uty, uth, p, h, r, e) def OnAbout(self, event): # Create a message dialog box d= wx.MessageDialog( self, " A sample editor \n" " in wxPython","About Sample Editor", wx.OK) d.ShowModal() # Shows it d.Destroy() # finally destroy it when finished. def OnExit(self, event): self.Close(True) # Close the frame. app = wx.PySimpleApp() frame = MainWindow(None, -1, "Apollo Body Control Panel") app.MainLoop() ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Visualpython-users mailing list Vis...@li... https://lists.sourceforge.net/lists/listinfo/visualpython-users UNITED GROUP This email message is the property of United Group. The information in this email is confidential and may be legally privileged. It is intended solely for the addressee. Access to this email by anyone else is unauthorised. If you are not the intended recipient, you may not disclose, copy or distribute this email, nor take or omit to take any action in reliance on it. United Group accepts no liability for any damage caused by this email or any attachments due to viruses, interference, interception, corruption or unauthorised access. If you have received this email in error, please notify United Group immediately by email to the sender's email address and delete this document. |
From: Ron A. <rr...@ro...> - 2008-02-06 22:04:13
|
Kailas Narendran wrote: > > As you can see from the code, for some reason the rotation that's > supposed to happen about the long axis of the box doesn't. the strange > thing is that the other ones work ok, so I'm not sure what I'm doing > wrong. > > I've attached the code if you want to try and run it. The problem is on > line 48. You'll notice that the arm doesn't follow the torso just yet, > which is ok. > > Any ideas? I played around with your program a bit and found it easier to group parts in frames. Attached is what I got so far. I think this will be easier for you to extend. Cheers, Ron |
From: Frédéric M. <fre...@gb...> - 2008-02-06 21:29:07
|
On mercredi 06 février 2008, Bruce Sherwood wrote: > Also, try the VPython example program stonehenge.py, which lets you move Ah, it was not in the contrib section, but in the core distribution! -- Frédéric http://www.gbiloba.org |
From: Bruce S. <Bru...@nc...> - 2008-02-06 20:43:10
|
A closely related topic was discussed on this list recently. One outcome of that was the moderately heavily documented program look_around.py which you'll find in the Contributed section of vpython.org. The contributed program movecamera.py is also somewhat relevant. Also, try the VPython example program stonehenge.py, which lets you move through a scene. I should point out however that there's a bug in scene management in the beta version of VPython: in stonehenge.py you can't advance beyond the (0,0,0) location. Bruce Sherwood Emanuele Gissi wrote: > Hi, > my experiments with vpython (stable) continue. > Now I am drawing simple civil building models. > > A small question remains unsolved to me: > * > how can I navigate my models in the scene as first person?* > > To explain better what I would like to obtain: > > * http://video.google.com/videoplay?docid=-7385748607842637032&hl=en > <http://video.google.com/videoplay?docid=-7385748607842637032&hl=en> > * http://en.wikipedia.org/wiki/First-person_shooter > > (I am a little ashamed for this second link, but now I hope it's clear > what I mean) > > I cannot really understand how to modify center and forward to do that. > But if someone gives me a hint, I am ready to code and contribute back. > > Thanks in advance to everybody, as usual. > Emanuele Gissi. |
From: Frédéric M. <fre...@gb...> - 2008-02-06 19:42:13
|
On mercredi 06 février 2008, Emanuele Gissi wrote: > my experiments with vpython (stable) continue. > Now I am drawing simple civil building models. > > A small question remains unsolved to me: > * > how can I navigate my models in the scene as first person?* > > To explain better what I would like to obtain: > > - http://video.google.com/videoplay?docid=-7385748607842637032&hl=en > - http://en.wikipedia.org/wiki/First-person_shooter > > (I am a little ashamed for this second link, but now I hope it's clear > what I mean) > > I cannot really understand how to modify center and forward to do that. > But if someone gives me a hint, I am ready to code and contribute back. > > Thanks in advance to everybody, as usual. There were an example in the contrib section, but I can't find it anymore... You should also look at these libraries: http://www.soya3d.org http://panda3d.org -- Frédéric http://www.gbiloba.org |
From: Emanuele G. <ema...@gm...> - 2008-02-06 18:24:31
|
Hi, my experiments with vpython (stable) continue. Now I am drawing simple civil building models. A small question remains unsolved to me: * how can I navigate my models in the scene as first person?* To explain better what I would like to obtain: - http://video.google.com/videoplay?docid=-7385748607842637032&hl=en - http://en.wikipedia.org/wiki/First-person_shooter (I am a little ashamed for this second link, but now I hope it's clear what I mean) I cannot really understand how to modify center and forward to do that. But if someone gives me a hint, I am ready to code and contribute back. Thanks in advance to everybody, as usual. Emanuele Gissi. |
From: Kadir H. <kha...@ya...> - 2008-02-06 07:14:57
|
Kallas, I think what you are doing is to rotate the axis of rotation for the box Chest, but not rotate the box itself. Although I use a bit different notation for rotation I updated your code like the following and it seems to work as you like: ... ... ... caxis=rotate( Chest.axis, utp ,(1,0,0) ) ### THIS IS YOUR FAMOUS LINE ### THIS WORKS BETTER WITH (1,0,0) RATHER THAN (2,0,0) caxis=rotate( caxis , uth ,(0,1,0) ) caxis=rotate( caxis , uty ,(0,0,1) ) SPL=ShoulderPosL print utp # Add this later to move arm with upper torso rotations # SPL=rotate( ShoulderPosL,utp,(1,0,0)) # SPL=rotate(SPL,uty,(0,0,1)) # SPL=rotate(SPL,uth,(0,1,0)) #Chest.pos=cloc #### DELETE THESE TWO LINES #Chest.axis=caxis Chest.rotate ( axis =caxis, angle=utp, origin=caxis) *** *** *** ADD THIS LINE FOR ROTATION ... ... ... Also, you seem to have problems with angle values with sliders (past 2*pi). I modified the slider scale for UTP, from -100,100 to -5,5 in class MAIN. It seems to work OK now. Good luck, Kadir Haldenbilen. ----- Original Message ---- From: Kailas Narendran <ka...@my...> To: vis...@li... Sent: Tuesday, February 5, 2008 11:52:18 PM Subject: [Visualpython-users] Visual Python Help Hi! I'm working on a program in visual python and am running into a weird problem (maybe it's my own user error, but I can't see what I'm doing wrong) To run the attached code, need wxpython installed too. In my code, I've got a "human body" constructed using some primitive blocks, cylinders, etc. I want to be able to model upper torso movement, as well as arm movement that's recorded by some sensors placed around the body. The arm movement works great, and I can easily control the position and rotation of the upper arm and elbow (all that I'm interested in). The torso is behaving a bit strangely. I have a Box object I create: Chest = box ( pos=(0,HeadDiameter+SegmentSpace+HeadDiameter/2,0), axis=(2*HeadDiameter,0,0), width=.75, height=HeadDiameter, length=2*HeadDiameter, color=color.red) And based on the "pitch", "yaw" and "heading" angles, I can rotate it. When the chest pitches forward, it needs to rotate about the line that goes through the gap between the torso and stomach, so I do the rotations with the vectors, moving the position of the chest block, as well as rotating it. (I actually tried the Rotate function for the block itself with no success) #(utp=pitch, uth=heading, uty=yaw) cloc=UTOrigin+rotate(UTUnitAxis,utp,(1,0,0))*HeadDiameter/2 caxis=rotate( (HeadDiameter*2,0,0), utp,(1,0,0) ) #### !!!! Why doesn't this make the check pitch forward? caxis=rotate(caxis,uty,(0,0,1)) caxis=rotate(caxis,uth,(0,1,0)) Chest.pos=cloc Chest.axis=caxis As you can see from the code, for some reason the rotation that's supposed to happen about the long axis of the box doesn't. the strange thing is that the other ones work ok, so I'm not sure what I'm doing wrong. I've attached the code if you want to try and run it. The problem is on line 48. You'll notice that the arm doesn't follow the torso just yet, which is ok. Any ideas? Thanks! -kailas -----Inline Attachment Follows----- ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ -----Inline Attachment Follows----- _______________________________________________ Visualpython-users mailing list Vis...@li... https://lists.sourceforge.net/lists/listinfo/visualpython-users ____________________________________________________________________________________ Looking for last minute shopping deals? Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping |
From: Kailas N. <ka...@my...> - 2008-02-05 21:52:59
|
Hi! I'm working on a program in visual python and am running into a weird problem (maybe it's my own user error, but I can't see what I'm doing wrong) To run the attached code, need wxpython installed too. In my code, I've got a "human body" constructed using some primitive blocks, cylinders, etc. I want to be able to model upper torso movement, as well as arm movement that's recorded by some sensors placed around the body. The arm movement works great, and I can easily control the position and rotation of the upper arm and elbow (all that I'm interested in). The torso is behaving a bit strangely. I have a Box object I create: Chest = box ( pos=(0,HeadDiameter+SegmentSpace+HeadDiameter/2,0), axis=(2*HeadDiameter,0,0), width=.75, height=HeadDiameter, length=2*HeadDiameter, color=color.red) And based on the "pitch", "yaw" and "heading" angles, I can rotate it. When the chest pitches forward, it needs to rotate about the line that goes through the gap between the torso and stomach, so I do the rotations with the vectors, moving the position of the chest block, as well as rotating it. (I actually tried the Rotate function for the block itself with no success) #(utp=pitch, uth=heading, uty=yaw) cloc=UTOrigin+rotate(UTUnitAxis,utp,(1,0,0))*HeadDiameter/2 caxis=rotate( (HeadDiameter*2,0,0), utp,(1,0,0) ) #### !!!! Why doesn't this make the check pitch forward? caxis=rotate(caxis,uty,(0,0,1)) caxis=rotate(caxis,uth,(0,1,0)) Chest.pos=cloc Chest.axis=caxis As you can see from the code, for some reason the rotation that's supposed to happen about the long axis of the box doesn't. the strange thing is that the other ones work ok, so I'm not sure what I'm doing wrong. I've attached the code if you want to try and run it. The problem is on line 48. You'll notice that the arm doesn't follow the torso just yet, which is ok. Any ideas? Thanks! -kailas |
From: Martin M. <pro...@gm...> - 2008-02-03 06:54:19
|
Hi Folks, After searching the mailing list it seemed like folks were having trouble with building standalone applications. (myself included!) It took me long enough to figure out that I wrote up a brief tutorial on how to build executables from your vpython files under windows, unix or IRIX. http://profmason.com/?p=548 I am afraid that the new math library might break this again, but it works for now with visual, numeric and numarrays. have fun! mmason |