Skip to main content
21-Topaz II
Dec 29, 2021 8:10 AM UTC
Solved

Why rotatemesh is in red?

Hello everyone,
I'm trying to use the "rotate" function obtained from the "plottool" collection downloaded from this community some time ago. I would like to know why the "rotatemesh" function is marked in red as it is evident from the following figure, while the function "rotate" which utilizes it, doesn't give error?:

rotate.jpg

23-Emerald V
Dec 29, 2021 9:04 AM UTC

@-MFra- wrote:

Hello everyone,
I'm trying to use the "rotate" function obtained from the "plottool" collection downloaded from this community some time ago. I would like to know why the "rotatemesh" function is marked in red as it is evident from the following figure, while the function "rotate" which utilizes it, doesn't give error?:

 


Because rotate operates upon the whole 3D mesh (3x(BoundxBound)) whereas rotatemesh only operates upon an individual mesh (eg, x-y or z-x (BoundxBound)).  Try vectorizing the rotatemesh expression in Frotate.

 

Stuart 

11 replies

24-Ruby IV
Dec 29, 2021 8:14 AM UTC

 Hi,

 

Please upload your worksheet.

Translate
23-Emerald V
Dec 29, 2021 9:04 AM UTC

@-MFra- wrote:

Hello everyone,
I'm trying to use the "rotate" function obtained from the "plottool" collection downloaded from this community some time ago. I would like to know why the "rotatemesh" function is marked in red as it is evident from the following figure, while the function "rotate" which utilizes it, doesn't give error?:

 


Because rotate operates upon the whole 3D mesh (3x(BoundxBound)) whereas rotatemesh only operates upon an individual mesh (eg, x-y or z-x (BoundxBound)).  Try vectorizing the rotatemesh expression in Frotate.

 

Stuart 

Translate
23-Emerald V
Dec 29, 2021 1:06 PM UTC

@StuartBruff wrote:

@-MFra- wrote:

Hello everyone,
I'm trying to use the "rotate" function obtained from the "plottool" collection downloaded from this community some time ago. I would like to know why the "rotatemesh" function is marked in red as it is evident from the following figure, while the function "rotate" which utilizes it, doesn't give error?:

 


Because rotate operates upon the whole 3D mesh (3x(BoundxBound)) whereas rotatemesh only operates upon an individual mesh (eg, x-y or z-x (BoundxBound)).  Try vectorizing the rotatemesh expression in Frotate.

 

Stuart 


Arrgggh!  Ignore the above.  That's not what's happening. 

 

A 3D-mesh is a 3x{mxn} nested array.  rotatemesh is designed to rotate a 3D-mesh.

 

Createmesh returns a nested 3D-mesh. In your instance, Createmesh returns a 1x1 array containing a 3D-mesh.   To handle nested 3D-meshes, you should use rotate, which is designed to rotate a set of 3D-meshes.   rotate will also handle a 3D-mesh and should, therefore, be used in preference to rotatemesh.

 

The reason vectorize works on rotatemesh(Fmesh, ...) is because the sole element of Fmesh is a 3D-mesh.   If you'd written rotatemesh(Fmesh₀,...) that would have worked as well.

 

2021 12 29 a.png

 

Apologies for the confusion.  I'm going to blame my responding just after I'd woken up and not having had a cup of tea. Either that or I'm just an idiot ... ☹️ 

 

Stuart

Translate
23-Emerald V
Dec 30, 2021 4:49 PM UTC

Yes, but, unfortunately, Prime's no longer capable of treating a set of related meshes as one object ... and I don't feel enamoured of the idea of typing in each and every one of the meshes to display several such objects.

 

I can't do the below in Prime.  I have to scale & translate outside of the plot then manually input each mesh into the 3D Plot.  Or, at least, AFAIA.

 

2021 12 30 a.png

 

Unless, ... just a minute ...

 

Doesn't solve all the problems, but ...

 

2021 12 30 b.png

 

where 

2021 12 30 c.png

 

Stuart

Translate