kml.quiver3d

Creates a quiver plot using 3D arrows, in the coordinates defined by longitude, latitude and altitude, and arrow sizes given by the speeds u, v and w. Similar to the built-in quiver3 function.

Contents

Syntax

kml.quiver3d(longitude, latitude, altitude, u, v, w)
kml.quiver3d(...,'PropertyName',PropertyValue,...)

Description

Creates a quiver plot using 3D arrows, such as the one supplied with the toolbox (arrow2d.dae). The arrows are created in the coordinates defined by longitude, latitude and altitude, and are scaled using the speeds u, v and w, and the size of the grid.

It is possible to use a different arrow model with the property pair 'model', 'modelfile.dae'

The units for the angular values are normally given in degrees, but this can be changed by calling: kml.useDegrees; or kml.useRadians; before plotting. Altitude is always given in meters.

It is possible to fine tune the point properties using name-value pairs:

kml.quiver3d(...,'PropertyName',PropertyValue,...)

Properties

Property NameTypeDescription
'model' string Path to a different 3D model file representing an arrow.
'name' string Name of the quiver plot inside the kml file
'description' string A short description of what the quiver plot represents
'visibility' true/false Control the initial visibility of the quiver plot
'scale' double Defines a scale factor to be applied to the whole quiver plot
'altitudeMode' string Choose if the altitude value is absolute to the earth model, relative to the ground level, or should be clamped to the ground. Valid inputs: 'absolute', 'relativeToGround', 'clampToGround'
'timeStamp' kml date string Associates the quiver plot to a moment in time. Should not be used together with timeSpan. Should be a string in the XML time format (more information available here)
'timeSpanBegin' kml date string Defines the moment in time where the quiver plot starts to exist. Should not be used together with timeStamp. Should be a string in the XML time format (more information available here)
'timeSpanEnd' kml date string Defines the moment in time where the quiver plot finishes to exist. Should not be used together with timeStamp. Should be a string in the XML time format (more information available here)

Example

% Create a new kml object
k = kml('my kml file');

% Create a sample quiver plot in the kml file
[x,y] = meshgrid(-2:.2:2,-1:.15:1);
z = x .* exp(-x.^2 - y.^2);
[px,py] = gradient(z,.2,.15);

k.quiver3d(10*x,10*y,1e5+x*0,1000*px,1000*py,-cosd(x)*1e2,'scale',1500)

% Save the kml and open it in Google Earth
k.run;

This is the result of running this example:

This file is part of the kml toolbox. Copyright 2012 Rafael Fernandes de Oliveira (rafael@rafael.aero)