Create p3d.c

class point3d (p3d) definition