histDirectional.
A key goal here is that the dimension n is not limited to 2 or 3, but in principle can
be arbitrary. Of course, as n increases compute times and required memory will increase
quickly. This package uses existing methods from computational geometry that work
in arbitrary dimension. Several of these functions were written as prototypes, so
getting something to work was the immediate goal, speed was not.
In this documentation we will use the term grid to mean a collection of points,
usually approximately evenly spread on a solid or surface. We will use the term mesh to mean both
the grid, and the grouping information that tells which points make up the
simplices that triangulate the region.
Please let me know if you find any mistakes. I will try to fix bugs promptly.
Constructive comments for improvements are welcome;
actually implementing any suggestions will be dependent on time constraints.
This research was supported by an agreement with Cornell University, Operations
Research & Information Engineering, under contract W911NF-12-1-0385 from the Army
Research Development and Engineering Command.
Version history:
rcdd is loaded,
it prints out a warning message about double precision numbers and
encourages the use of rational arithmetic. I do not know how to suppress this message.UnitSimplex( n=2, k=3 )
UnitBall( n=3, k= 2 )
plot( SolidSimplex( n=2, k=3 ), col="red" )
title("2d solid simplex")
plot( SolidSimplex( n=3, k=4 ) )
plot( UnitSimplex( n=3,k=4), new.plot=FALSE, col="red", lwd=5 )
title3d("unit simpex and solid simplex in 3d")
rgl.viewpoint( -45, 15)
plot( UnitSphere( n=3, k=2 ), col="blue")
mesh2 <- AffineTransform( UnitBall( n=3,k=2 ), A=diag(c(1,1,1)), shift=c(3,0,0) )
plot( mesh2, new.plot=FALSE, col="magenta" )
title3d("triangulation of unit sphere and ball in 3d")
demo(mvmesh) # shows a range of meshes
demo(mvhist) # shows a range of multivariate histograms
demo(mvmesh2) # miscellaneous examplesRun the code above in your browser using DataLab