The ring Object
The ring object is circular, with a specified outer radius and thickness, and with its center given by the pos attribute:
ring(pos=(1,1,1), axis=(0,1,0), radius=0.5, thickness=0.1)
The ring object has the following attributes and default values, like those for cylinders: pos (0,0,0), x (0), y(0), z(0), axis (1,0,0), length (1), color (1,1,1) which is color.white, red (1), green (1), blue (1), and up (0,1,0). As with cylinders, up has a subtle effect on the 3D appearance of a ring. The axis attribute only affects the orientation of the ring; the magnitude of the axis attribute is irrelevant. Additional ring attributes:
radius Outer radius of the ring, default = 1
thickness Thickness of ring (1/10th of radius if not specified)
Note that the pos 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.
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\comphy>python
Python 2.5 (r25:51908, Sep 19 2006, 09:52:17) [MSC v.1310 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> from visual import *
>>> ring(pos = (1,1,1), axis = (0,1,0), radius = 0.5, thickness = 0.1)
<visual.primitives.ring object at 0x092CE7E0>
>>> ring(pos = (-1,0,-1), axis = (-1,2,-1), radius = 0.7, thickness = 0.1, color
= (1,0,0))
<visual.primitives.ring object at 0x092CE840>
>>> ring(pos = (1,-1,2), axis = (3,-4,4), radius = 1.2, thickness = 0.3, color =
(0,1,0))
<visual.primitives.ring object at 0x092CE870>
>>>
'기본 카테고리' 카테고리의 다른 글
두번째 Flash 자작 애니메이션 ''''눈내리는 산장'''' (0) | 2007.03.08 |
---|---|
vpython으로 3D programming 시작하기 #8 (0) | 2007.03.04 |
[경영바이블] p19 과거를 포기하라 (0) | 2007.03.04 |
[경영바이블] p18 모든 조직은 변화해야 한다. (0) | 2007.03.03 |
vpython으로 3D Programming 시작하기 #6 (0) | 2007.03.03 |