Discussion:
[Visualpython-users] VPython-basics: how move the centre-point of rotation to the centre of a cuboid (not (0, 0, 0)) ?
Ottmar Petry
2013-02-15 16:02:19 UTC
Permalink
<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<font size="-1">Hello.<br>
<br>
I want to show 3D-geometric objects like wooden boards<br>
with drillings/holes inside and e.g. pockets milled inside and
found some infos<br>
about Python/VPython.  Normally I am programming in C++ (Visual
Studio 2008 Windows)<br>
but I did not find a very simple free tool to generate a 3D-view
of such simple<br>
geometric figures which can easily be zoomed and rotated.<br>
<br>
Then I found VPython, made the installation and took a look at the
examples.<br>
This seemed to be quite simple.<br>
<br>
But off course I will need some help and therefore I looked for
further info<br>
and found this mailing list.<br>
I wonder why there is no forum for VPython users ?<br>
Now I try to get some answers to basic questions of a beginner.<br>
<br>
When I draw a cuboid / cube with details around it and have the
point (0,0,0)<br>
at one corner of the cuboid then I want to set the zero-point for
<br>
rotation and zooming somewhere in the centre of the cuboid and not
in (0,0,0).<br>
<br>
At the moment it seems to me that the centre-point for rotation
using the<br>
mouse is always (0,0,0). How can I move this point to the centre
of the whole<br>
geometry ? Or how can I reach the same result ?<br>
<br>
Can you send me some simple example for building such geometries
with a cuboid<br>
or links to sides with some examples ?<br>
<br>
That would be very nice.<br>
Thanks in advance<br>
Ottmar<br>
<br>
<br>
</font>
</body>
</html>
Bruce Sherwood
2013-02-15 17:24:57 UTC
Permalink
I meant to share this note with the whole mailing list, especially because
the user asked why we don't have a forum, which is a good question. It's
basically just historical. I've been increasingly pleased with Google
Groups; so I'll look into creating one for the VPython community.

Bruce Sherwood

---------- Forwarded message ----------
From: Bruce Sherwood <***@ncsu.edu>
Date: Fri, Feb 15, 2013 at 10:06 AM
Subject: Re: [Visualpython-users] VPython-basics: how move the centre-point
of rotation to the centre of a cuboid (not (0, 0, 0)) ?
To: Ottmar Petry <Ottmar-***@gmx.de>


You can change the center of the scene (which is also the center of camera
rotation with the mouse) by setting scene.center.

You may have already found them, but I'll point out that there is a great
variety of example programs installed when you install VPython. The
download page at vpython.org explains how to find these programs. For
example, on Windows, after starting VIDLE just go to File > Open and you
can choose an example program to run. Also, in the Contributed section of
vpython.org you will find a variety of additional example programs.

You mention wanting to make objects with holes in them. Be sure to study
the "extrusion" object, and the example programs that use extrusions.

Bruce Sherwood
Post by Ottmar Petry
Hello.
I want to show 3D-geometric objects like wooden boards
with drillings/holes inside and e.g. pockets milled inside and found some
infos
about Python/VPython. Normally I am programming in C++ (Visual Studio
2008 Windows)
but I did not find a very simple free tool to generate a 3D-view of such
simple
geometric figures which can easily be zoomed and rotated.
Then I found VPython, made the installation and took a look at the
examples.
This seemed to be quite simple.
But off course I will need some help and therefore I looked for further
info
and found this mailing list.
I wonder why there is no forum for VPython users ?
Now I try to get some answers to basic questions of a beginner.
When I draw a cuboid / cube with details around it and have the point
(0,0,0)
at one corner of the cuboid then I want to set the zero-point for
rotation and zooming somewhere in the centre of the cuboid and not in
(0,0,0).
At the moment it seems to me that the centre-point for rotation using the
mouse is always (0,0,0). How can I move this point to the centre of the
whole
geometry ? Or how can I reach the same result ?
Can you send me some simple example for building such geometries with a
cuboid
or links to sides with some examples ?
That would be very nice.
Thanks in advance
Ottmar
Loading...