Re: [R] help with cube3d cube size

From: Duncan Murdoch <>
Date: Tue, 24 Jun 2008 22:49:33 -0400

Mark Kimpel wrote:
> I'm using the command below on an open3d() object to create a shaded
> cube. Changes to myScalingFactor do not effect changes in the size of
> the cube. What is the correct approach? Mark
> shade3d(translate3d(cube3d(identityMatrix() *
> myScalingFactor),-6,1,-1),col="green", alpha = 0.2)
Homogeneous coordinates are strange. Your

identityMatrix() * myScalingFactor

produces a matrix that has the same effect as not multiplying. You need

scaleMatrix(myScalingFactor, myScalingFactor, myScalingFactor)

to get a size change.

Duncan Murdoch mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Wed 25 Jun 2008 - 02:57:00 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 25 Jun 2008 - 05:31:30 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive