0
$\begingroup$

I'm looking for the simplest equation to draw a cube based on its center and/or other verticies specified.

For example, let's say I have the 3D column vector (as I'm using OpenGL to do this):

x_3 y_1 z_4 

I would like to specify and fill in its remaining vertices from this coordinate. I know there is a formula to do this for a square, albeit I can't seem to find it. If this is simply not possible (due to too little information), what's the simplest way to perform this?

Mind you, I have taken a look at this, although it appears to be dealing with 2-dimensional vertices/vectors rather than 3-dimensional ones. I'm using 3D entirely to build what I'm trying to build.

Thus, is this possible? If not, what are the minimum amounts of vertices which need to be given, along with the simplest equation to "fill in the gaps", so to speak?

Update

Common sense has revealed to me that this is impossible (duh). However, something tells me that it's possible to specify the center of a cube, along with its floating point mass, and compute the verticies from there. What is the formula for this?

Update 2

Note: the edge length of a cube and its center point are givens.

  • 0
    To be clear: you have the edge length of the cube and the center point as givens?2012-02-10
  • 0
    by edge length are you referring to length as in l x w x h?2012-02-10
  • 0
    I just looked it up. Yes, the edge length of a cube and the center point are givens.2012-02-10
  • 0
    Well, a mass is not a length, but I guess your cube has a constant density of $1$, in which case the mass $m$ is indeed equal to the volume $V$ and you can determine the side length with a simple $s=\sqrt[3]{V}$. If not, then you need more information than just the mass to gain information about the cube's size.2012-02-10
  • 0
    What kind of information is required?2012-02-10
  • 2
    Consider a cube of unit edge length centered at the origin. What would be the coordinates of the corners of that cube? From there, you only need to do scaling and shifting for arbitrarily sized cubes centered on arbitrary points.2012-02-10

2 Answers 2