Using pointers to create points mesh