QUESTION IMAGE
Question
in vpython, finish the code to draw a vertical axis.
origin = vector (0, 0, 0)
axis = cylinder(pos=origin, axis=vector() )
Step1: Define vertical direction in 3D
In a 3 - D Cartesian coordinate system, the vertical direction along the z - axis is represented by the vector with x = 0, y = 0 and non - zero z. For a simple vertical axis, we can choose a non - zero value for z. Let's assume a length of 1 for simplicity.
Step2: Fill in the vector values
The vector for the vertical axis should be (0, 0, 1). So the completed code for the axis variable would be axis = cylinder(pos=origin, axis=vector(0, 0, 1))
Snap & solve any problem in the app
Get step-by-step solutions on Sovi AI
Photo-based solutions with guided steps
Explore more problems and detailed explanations
0, 0, 1