728x90
반응형
SMALL
2D Shapes
2D shapes은 3D shapes에서 shape=으로 사용된다.
extrusion(path=[vector(a,b,c),vector(e,f,g)] ,shape=shapes.<2D shape>() )
도형의 구멍을 제거하기 위해 두께 parameter를 제거하면 된다.


https://www.glowscript.org/docs/VPythonDocs/shapes.html
VPython Help
The shapes and paths libraries The shapes and paths libraries are mainly used together with the 3D extrusion object. The shapes library helps in creating complex 2D shapes by creating and combining basic geometric shapes. In the shape shown above, a circul
www.glowscript.org
Sphere
크기가 반지름으로 대체된다는 점을 제외하고 box( )를 구로 표현하려면 sphere()를 사용한다.
sphere(radius=2)은 반지름이 2인 구를 생성한다.

3D Shapes

https://www.glowscript.org/docs/VPythonDocs/primitives.html
VPython Help
www.glowscript.org
728x90
반응형
LIST
'Python Library > VPython' 카테고리의 다른 글
[VPython] Widgets (0) | 2022.01.17 |
---|---|
[VPython] Parameters (0) | 2022.01.13 |
[VPython] Shapes (0) | 2022.01.13 |
[VPython] Basics (0) | 2022.01.13 |
VPython (0) | 2022.01.13 |