Agnel Kurian
Agnel Kurian

Reputation: 59516

How to construct ground surface of infinite size in a 3D CAD application?

I am trying to create an application similar in UI to Sketchup. As a first step, I need to display the ground surface stretching out in all directions. What is the best way to do this?

Options:

  1. Create a sufficiently large regular polygon stretching out in all directions from the origin. Here there is a possibility of the user hitting the edges and falling off the surface of the earth.
  2. Model the surface of the earth as a sphere/spheroid. Here I will be limiting my vertex co-ordinates to very large values prone to rounding off errors. (Radius of earth is 6371000000 millimeter).
  3. Same as 1 but dynamically extend the ends of the earth as the user gets close to them.

What is the usual practice?

Upvotes: 1

Views: 234

Answers (1)

Kai Mattern
Kai Mattern

Reputation: 3085

I guess you would do neither of these, but instead use a virtual ground.

So you just find out, what portion of the ground is visible in the viewport and then create a plane large enough to fill that. With some reasonable maxiumum, which simulates the end of the line of sight aka horizon as we know it.

Upvotes: 1

Related Questions