Edit and compile if you like:
% Author: Izaak Neutelings (Februari 2019)% Inspiration: https://tex.stackexchange.com/questions/285578/how-to-draw-parallelepiped-and-cube-with-latex/288101#288101\documentclass[border=3pt,tikz]{standalone}\usetikzlibrary{quotes,arrows,arrows.meta}\tikzset{>=latex} % for LaTeX arrow head\colorlet{myblue}{blue!20}\colorlet{mydarkblue}{blue!50!black}\colorlet{myred}{black!50!red}% CUBE\tikzset{cube/.pic={\tikzset{every edge quotes/.append style={midway,auto},/cube/.cd,#1}\def\csize{2*\cubesize}\draw [every edge/.append style={pic actions,densely dashed,opacity=.5},pic actions](0,0,0) coordinate (o)edge coordinate [pos=1] (g) ++(0,0,-\csize)--++(0,\csize,0) coordinate (a)--++(\csize,0,0) coordinate (b)--++(0,-\csize,0) coordinate (c) -- cycle(a) --++(0,0,-\csize) coordinate (d) edge (g)--++(\csize,0,0) coordinate (e) -- (b) -- cycle(c) -- (b) -- (e)--++(0,-\csize,0) coordinate (f) edge (g) -- cycle;\path [every edge/.append style={pic actions, |-|}];},z={(-0.334,-0.334)},/cube/.search also={/tikz},/cube/.cd,size/.store in=\cubesize, size=1,}% GAS MOLECULE with vector\tikzset{gasparticle/.pic={\tikzset{/gasparticle/.cd,#1}\draw[->,green!60!black] (0,0) -- (\vec);\node[circle,fill,inner sep=.8,fill=black!80!blue] at (0,0,0) {};}/gasparticle/.search also={/tikz},
Click to download: gas.tex • gas.pdf
Open in Overleaf: gas.tex