-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathclone.html
More file actions
60 lines (58 loc) · 3.62 KB
/
Copy pathclone.html
File metadata and controls
60 lines (58 loc) · 3.62 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
<!-- 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="new_features.html"> What's new</a></p>
<p class="Normal"><a href="https://vpython.org" target="_blank"> Classic VPython web site</a><br />
<a href="license.txt" target="_blank"> VPython license</a><br />
<a href="https://www.python.org" target="_blank"> Python web site</a> <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">clone</font></span></div></td>
<td width="23%"><div align="center"><img src="images/clone.jpg" alt="ring" width="114" height="254" /><a href="arrow.html"></a></div></td>
</tr>
</table>
</div>
<div>
<p class="Normal"> You can clone objects:</p>
<p class="program">b = box(pos=vector(1,1,0), axis=vector(1,1,0),<br />
color=color.red)<br />
bcopy = b.clone(pos=vector(1,-1,0))</p>
<p class="Normal">This will give you two copies of a box, differing only in their positions. After making the clone, changes to the clone do not affect the original box. </p>
<p class="Normal">If you simply say <strong>b.clone()</strong>, all of the properties of the new object are exactly the same as those of the original object.</p>
<p class="Normal"><strong><font color="#0000a0">Current restrictions</font></strong></p>
<p class="Normal">Currently you cannot clone triangles/quads, because it is the underlying vertex objects that control their appearance. You <em>can</em> clone compound objects.</p>
<p class="Normal">It used to be the case that there was no way to clone an object from one canvas to another, but now this can be done simply by specifying the other canvas in the arguments to the clone() function, like this: bcopy = b.clone(pos=vector(1,-1,0), canvas=othercanvas).. It is however the case that you cannot clone a compound object to a different canvas; this restriction also applies to extrusion objects, which are compunds of triangles and quads.</p>
<!-- InstanceEndEditable -->
</div>
</div>
</body>
<script type="text/javascript" language="javascript" src="navigation.js"></script>
<!-- InstanceEnd --></html>