The arrow Object
The arrow object has a straight box-shaped shaft with an arrowhead at one end. The following statement will display an arrow pointing parallel to the x axis:
화살표 오프젝트는 직선상장모양의 한쪽 끝쪽에선 화살표머리를 가지지 않는다.
아래에 언급되는 선언문에서는 X축에 평행하게 가르키는 화살표를 생성한다.
pointer = arrow(pos=(0,2,1), axis=(5,0,0), shaftwidth=1)
The arrow 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). The up attribute is significant for arrow because the shaft and head have square cross sections, and setting the up attribute rotates the arrow about its axis. Additional arrow attributes:
shaftwidth By default, shaftwidth = 0.1*(length of arrow)
headwidth By default, headwidth = 2*shaftwidth
headlength By default, headlength = 3*shaftwidth
Assigning any of these attributes to 0 makes it use defaults based on the size of the arrow. If headlength becomes larger than half the length of the arrow, or the shaft becomes thinner than 1/50 the length, the entire arrow is scaled accordingly.
This default behavior makes the widths of very short arrows shrink, and the widths of very long arrows grow (while displaying the correct total length). If you prefer that shaftwidth and headwidth not change as the arrow gets very short or very long, set fixedwidth = 1. In this case the only adjustment that is made is that headlength is adjusted so that it never gets longer than half the total length, so that the total length of the arrow is correct. This means that very short, thick arrows look similar to a thumbtack, with a nearly flat head.
Note that the pos attribute for cylinder, arrow, cone, and pyramid corresponds to one end of the object, whereas for a box, sphere, or ring it corresponds to the center of the object.
'기본 카테고리' 카테고리의 다른 글
vpython으로 3D Programming 시작하기 #4 (0) | 2007.03.01 |
---|---|
vpython으로 3D Programming 시작하기 #3 (0) | 2007.03.01 |
vpython으로 3d 프로그래밍 시작하기 (0) | 2007.02.24 |
Java로 3D 그래픽 구현하기 시작하기 (0) | 2007.02.21 |
첫번째 FLASH 자작 애니메이션 김소월 산유화 (0) | 2007.02.18 |