-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathring.html
More file actions
86 lines (83 loc) · 5.56 KB
/
Copy pathring.html
File metadata and controls
86 lines (83 loc) · 5.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!-- InstanceBegin template="/Templates/template.dwt" codeOutsideHTMLIsLocked="false" --><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- InstanceBeginEditable name="doctitle" -->
<title>VPython Help</title>
<!-- InstanceEndEditable -->
<!-- InstanceBeginEditable name="head" -->
<link href="VisualRef.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {font-size: x-large}
.style2 {font-size: xx-large}
-->
</style>
<!-- InstanceEndEditable -->
</head>
<body>
<div id="wrapper">
<div id="leftmenu">
<p class="Normal"><a href="index.html"> Home</a></p>
<p class="Normal"> If you're new to Python <br />
and VPython: <a href="VisualIntro.html">Introduction</a></p>
<p class="Normal"> A VPython <a href="VPython_Intro.pdf" target="_blank">tutorial</a></p>
<p class="Normal"><a href="videos.html"> Introductory Videos</a></p>
<p class="Normal"><a href="primitives.html"> Pictures</a> of 3D objects</p>
<p> <select id="menu1" onChange="jumpMenu(this)"></select></p>
<p> <select id="menu2" onChange="jumpMenu(this)"></select></p>
<p> <select id="menu3" onChange="jumpMenu(this)"></select></p>
<p class="Normal"><a href="https://vpython.org" target="_blank"> VPython 7 web site</a><br />
<a href="license.txt" target="_blank"> VPython license</a><br />
<br />
</p>
</td>
</div>
<div id="content">
<!-- InstanceBeginEditable name="content" -->
<div>
<table width="100%" border="1">
<tr>
<td width="77%"><div align="center"><span class="style1 style2"><font color="#0000A0">ring</font></span></div></td>
<td width="23%"><div align="center"><img src="images/ring.jpg" alt="ring" width="131" height="127" /><a href="arrow.html"></a></div></td>
</tr>
</table>
</div>
<div>
<p class="Normal"> <img src="ring.gif" alt="ring" width="153" height="247" align="right" /> The ring object
is by default circular, with a specified radius and thickness and with its center
given by the <span class="attribute">pos</span> attribute:</p>
<div>
<p class="program"> ring(pos=vector(1,1,1), <br />
axis=vector(0,1,0), <br />
radius=0.5, thickness=0.1)</p>
<p class="Normal"> The ring object has the following attributes and
default values, similar to those for cylinders: <span class="attribute">pos<font color="#000000"> vector(0,0,0)</font></span>, <span class="attribute">axis<font color="#000000"> vector(1,0,0)</font></span>, <span class="attribute">length<font color="#000000"> (</font></span><font color="#000000">0.2<span class="attribute">)</span></font>, <span class="attribute">color<font color="#000000"> vector(1,1,1)
which is color.white</font></span>, <span class="attribute">red<font color="#000000"> (1)</font></span>, <span class="attribute">green<font color="#000000"> (1)</font></span>, <span class="attribute">blue<font color="#000000"> (1)</font></span>, <span class="attribute">opacity</span> (1),
<span class="attribute">shininess</span> (0.6), <span class="attribute">emissive</span> (False), <a href="textures.html"><strong>texture</strong></a>, and <span class="attribute">up<font color="#000000"> (0,1,0)</font></span>.
As with cylinders, <span class="attribute">up</span> has a subtle
effect on the 3D appearance of a ring unless a non-smooth texture
is specified or the ring is oval. The <span class="attribute">axis</span> attribute
only affects the orientation of the ring; the magnitude of the <span class="attribute">axis</span> attribute
is irrelevant. Additional ring attributes:</p>
<p class="attributes"> <span class="attribute">radius</span> Radius
of the central part of the ring, default = 1, so <br />
outer radius = radius+thickness<br />
inner radius = radius-thickness </p>
<p class="attributes"> <span class="attribute">thickness</span> The
radius of the cross section of the ring (1/10th of radius if not
specified), not the full diameter as you might
expect. </p>
<p class="attributes"> <span class="attribute">size</span> Instead of specifying radius and thickness, you can make the ring be oval by specifying its size as size=vector(length,height,width), with different height and width..</p>
<p class="Normal"> Note that the <span class="attribute">pos</span> attribute
for cylinder, arrow, cone, and pyramid corresponds to one end of the object,
whereas for a ring, sphere, and box it corresponds to the center of the
object. </p>
<p class="Normal">If you include <span class="attribute">make_trail=True</span> when you create the object, a trail will be left behind the object as you move it. For related options, see <a href="trail.html"><strong>Leaving a Trail</strong></a>.</p>
<p class="Normal">See <a href="rotation.html"><strong>Rotating an Object</strong></a> for an easy way to change the orientation of an object.</p>
<p class="Normal">See description of <a href="options.html">Additional
Attributes</a> available for all 3D display objects.</p>
<!-- InstanceEndEditable -->
</div>
</div>
</body>
<script type="text/javascript" language="javascript" src="navigation.js"></script>
<!-- InstanceEnd --></html>