Create a 6 sided polygon from 8 3d points

Blitz3D Forums/Blitz3D Programming/Create a 6 sided polygon from 8 3d points

Blitzplotter(Posted 2011) [#1]
Hi,

Has anyone created code that would create a 6 sided polygon, based on 8 points in 3d space, not necessarily a cuboid:-

(the following shows 10 points which would form the 'base' of the co-ordinated for a 3D pentagon created from code.)



My aspiration is to from the five inner points on a pentagon, extrapolate 5 blue points using a central point to calculate the 'outer' base of the pentagon. The problem I see is that I would not be able to create a pentagon due to the problem I perceive due to the 'grey' points being extrapolated from the inner pentagon instead of the one pink point.

Once I've calculated the outer pentagon's coords in the x & z plane, I hope to extrapolate another 4 co-ords in the y-plane from the first 4, ultimately creating a pentagon with 3D walls from simply 5 pairs of x & z co-ords - the inner pentagon.

Last edited 2011