A tiny software raymarcher that attempts to render "n-dimension" manofold insertions as an image appearing to be a non-euclidean 3-dimensional space. Written for the uqcs hackathon 2020. This repo is a mirror of: https://github.com/ailrst/blackpink
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

28 lines
896 B

#ifndef DISTFU
#define DISTFU
struct object new_sphere(struct vec *, double, double);
/* Don't call this, it's just a placeholder rn */
struct object new_cone(struct vec *, double, double);
struct object new_box(struct vec *, double, double);
struct object new_vert_line(struct vec *, double, double);
struct object* new_tree(struct vec *, double, double);
struct object new_object(struct vec *, double, double, double (*) (struct vec *),
struct colour (*)(struct ray *, struct object *));
struct object new_plane(struct vec* position, double rotation, double scale);
double sdf_box(struct vec *);
double sdf_hplane(struct vec *);
double sdf_phat_vert_line(struct vec *);
double sdf_sphere(struct vec *);
struct colour yeet_col(struct ray *);
double sdf_3ellipsoid(struct vec *x);
double sdf_4ellipsoid(struct vec *x);
double clamp(double val, double min, double max);
#endif