As you may already know new mesh body type was introduced in a new version of LSS Arch extension for SketchUp. It is possible to think of blob body type as of conventional mesh but in spherical coordinate system.

As is evident from the presentation above adaptation of mesh logic from Cartesian to spherical coordinate system was more or less obvious for three of algorithms implemented earlier ("IDW", "average", "minimize").

Adaptation of the rest two algorithms was a bit more tricky for the following reason. Both "trend" and "predict" algorithms use fit_plane_to_points method provided by SketchUp API. This method allows to estimate a trend plane from a given set of scattered points. The point is that trend plane does not make sense for spherical data set.

In case of a spherical data set it should be some trend surface instead of a plane. There is no built-in method for estimation of such surface provided by API (unfortunately). So the idea is to map given nodal points somehow from spherical coordinate system to Cartesian, then to apply previously implemented logic, which works with conventional Cartesian data set. Finally it is possible to "inverse map" calculated results back to spherical coordinate system.

First attempt during experiments was naive straight forward mapping, when spherical angles azimuth and elevation are used as X, Y coordinates respectively and length of a radius vector is used as Z coordinate. This method is obviously failed: it caused blatant seam at a zero meridian (the boundary between 0° and 360° azimuths).

The second idea was a bit more sophisticated. The idea was to use a sort of a conic projection similar to the one described in presentation right from a "south pole" point.

This method also sort of failed, because it produces blatant spike or pit at a "north pole" point.

The solution, which finally did the trick, was to use projection described in the presentation "dynamically" for each point being calculated during interpolation.

## No comments:

## Post a Comment