3d cube with x,y,z directional vectors

In summary, the conversation discusses how to plot a 3d cube using directional vectors without x,y,z axes. Two possible methods are suggested, one using Mathematica, Matlab, or the Tikz package in Latex and the other using the XYZ coordinate system described in section 22.2 of the TikZ manual.
  • #1
Dustinsfl
2,281
5
How can I plot a 3d cube with x,y,z directional vectors going through it?

Mathematica or Matlab or Tikz package Latex
 
Physics news on Phys.org
  • #2
Do you still need help with this? There are many examples on the web. Do you need the origin to be in the center of the cube or in one of its vertices?
 
  • #3
Evgeny.Makarov said:
Do you still need help with this? There are many examples on the web. Do you need the origin to be in the center of the cube or in one of its vertices?

I don't need a x,y,z axis. A cube in free space only with vectors. I still need help.
 
  • #4
This is one way.

Code:
 \usetikzlibrary{arrows}
 \begin{tikzpicture}[>=stealth',x=2cm,y=2cm,z=0.77cm]
 \fill (0,0) circle (1.5pt);
 \draw (0,0) -- (1,0) -- (1,1) -- (0,1) -- cycle;
 \begin{scope}[shift={(0,0,1)}]
 \draw (0,0) -- (1,0) -- (1,1) -- (0,1) -- cycle;
 \end{scope}
 \draw (0,0) -- (0,0,1) (0,1) -- (0,1,1) (1,0) -- (1,0,1) (1,1) -- (1,1,1);
 \end{tikzpicture}

View attachment 362

For the description of the XYZ coordinate system, see section 22.2 on p. 249 in the v. 2.10 TikZ manual.
 

Attachments

  • cube.png
    cube.png
    756 bytes · Views: 78
  • #5
Evgeny.Makarov said:
This is one way.

Code:
 \usetikzlibrary{arrows}
 \begin{tikzpicture}[>=stealth',x=2cm,y=2cm,z=0.77cm]
 \fill (0,0) circle (1.5pt);
 \draw (0,0) -- (1,0) -- (1,1) -- (0,1) -- cycle;
 \begin{scope}[shift={(0,0,1)}]
 \draw (0,0) -- (1,0) -- (1,1) -- (0,1) -- cycle;
 \end{scope}
 \draw (0,0) -- (0,0,1) (0,1) -- (0,1,1) (1,0) -- (1,0,1) (1,1) -- (1,1,1);
 \end{tikzpicture}

https://www.physicsforums.com/attachments/362

For the description of the XYZ coordinate system, see section 22.2 on p. 249 in the v. 2.10 TikZ manual.

Code:
\begin{tikzpicture}[>=stealth',x = 2cm,y = 2cm,z = 0.77cm]
 \draw[->] (.9,159/110,0)-- (-.5,-107/110,0) node[anchor = south east]{$\frac{\partial }{\partial y}$};
 \draw[->] (-1.3,.15) -- (1.5,.15) node[anchor = north east]{$\frac{\partial }{\partial x}$};
 \draw[->] (.15,-1.3) -- (.15,1.5) node[anchor = north east]{$\frac{\partial }{\partial z}$};
 \draw (-.5,-.5) -- (.5,-.5) -- (.5,.5) -- (-.5,.5) -- cycle;
 \begin{scope}[shift = {(0,0,1)}]
 \draw (-.5,-.5) -- (.5,-.5) -- (.5,.5) -- (-.5,.5) -- cycle;
 \end{scope}
 \draw (-.5,-.5) -- (-.5,-.5,1) (.5,-.5) -- (.5,-.5,1) (.5,.5) -- (.5,.5,1) (-.5,.5) -- (-.5,.5,1);
\end{tikzpicture}
 

FAQ: 3d cube with x,y,z directional vectors

What is a 3D cube with x, y, z directional vectors?

A 3D cube with x, y, z directional vectors is a geometric shape that has three sets of directional vectors for each axis. These vectors determine the position, size, and orientation of the cube in three-dimensional space.

How is a 3D cube with x, y, z directional vectors different from a regular cube?

A regular cube only has three dimensions (length, width, and height), while a 3D cube with x, y, z directional vectors has six dimensions (three directional vectors for each axis). This allows for more control and precision when manipulating the cube in 3D space.

What are the uses of a 3D cube with x, y, z directional vectors in science?

A 3D cube with x, y, z directional vectors is commonly used in scientific fields such as physics, computer graphics, and engineering. It is used to represent and visualize objects in 3D space, and can also be used for simulations and calculations.

How are x, y, z directional vectors represented in a 3D cube?

The x, y, z directional vectors are typically represented by arrows pointing in the direction of each axis. The length of each arrow represents the magnitude of the vector, and the direction of the arrow represents the direction of the vector.

Are there any limitations to using a 3D cube with x, y, z directional vectors?

While a 3D cube with x, y, z directional vectors is a useful tool for visualizing and manipulating objects in 3D space, it is limited by the accuracy and precision of the directional vectors. Additionally, it may not be suitable for representing complex shapes or objects with irregular dimensions.

Similar threads

Replies
5
Views
862
Replies
4
Views
651
Replies
2
Views
3K
Replies
1
Views
1K
Replies
1
Views
1K
Replies
1
Views
3K
Replies
4
Views
2K
Replies
1
Views
2K
Back
Top