Ronan

1376 Reputation

16 Badges

13 years, 270 days
East Grinstead, United Kingdom

MaplePrimes Activity


These are replies submitted by Ronan

@acer I was going for that through divide and trunc. Forgot about iquo and irem 

What is was most stuck in was trying to get the color list out of the styles list. Realised I can do the following. Is there a more efficient way?

styles1:=[symbol=solidcircle,colour = [red,green,blue,magenta],symbolsize=20];
   
for i to nops(styles1) do
if has(styles1[i],colour) then
#print(i);
  Cc:=rhs(styles1[i]);
  break;
end if;
end do

 

@mmcdara I am basilally plotting points and lines. Using a tetrahedron for example. 4 points and 6 line segments with can be plotted using the plottools:-line command.display the 3Dplot. Using an orientation matrix and it's projection onto 2D can the (X,Y) actual plotted coords of the 3D points be accessed. Then do a 2D plot of these points and lines and plot  the text based on these points. The 2D plot would have to update if the 3D plot is rotated. I know that would not scale the height and length of the text.
 I have a procedure now for aligning text based on two points or a point and line/vector that alows shifting it back and forth parallel to the line/vector alongwith changing it's offset from the line to suit text size. I can modify it to share, because at present it calls other procedures in my package. 

@mmcdara Thank you for answering. You code is looking for some file img.jpg. Could you upload a copy. 
I sort of figured there is no good solution. I noticed even if one transforms a 2d plot to 3d the text looses alignment. 

I found the problem. I write the packace and procedures in the VS code editor. That can run CMaple which is useful. But to test the prcedures on their own I have to put in the line "uses RationalTrigonometry;" This then must be "# out" before building the package in Maple. Otherwise one get all sorts of warnings depending which proceduses it is used in. I found if because on a procedure I altered started producing warning about types being overwritten where as the previouse version of it did not. Of course i nthe process of tyring to find what was wrong, I uninstalled and reinstalled Maple thinking it must be some form of corruption.  All seems ok now.

@nm @C_R I have am writing my own RationalTrigonometry package. It has as two subpackages UHG and RT Projective.

It has been through various incarnations over the past few years. Some of the commands have changed. I was using the aliases to maintain compatability with older worksheets. The are turning out to be more trouble than they are worth.

As I said the problem began a few nights ago.

@mmcdara Oh Good.. The download from Google Docs worked for me.  Interesting post.

@Carl Love Thank you. That I didn't think of trying.

It turns out that Dotproduct, BilinearForm and CrossProduct work for 1 x 3 and 3 x 1 Matrices. The help pages don't mention this,
with the CrossProduct this usage <CrossProduct(A,B)> returns matrix format/type.

 

ProjCp:=overload([

proc(a::Matrix(1,3),b::Matrix(1,3))
option overload;
description "join of points";
uses LinearAlgebra;
local A:=a,B:=b;
print("line thro' points");
<CrossProduct(A,B)>^%T;
end proc,

proc(a::Matrix(3,1),b::Matrix(3,1))
option overload;
description "meet of lines";
uses LinearAlgebra;
local A:=a,B:=b;
print("intersect point");
<CrossProduct(A,B)>^%T;
end proc,

proc(A::{Matrix(1,3),Matrix(3,1)},B::{Matrix(1,3),Matrix(3,1)})
option overload;
description "incidence of point and line";
uses LinearAlgebra;
local dp;
if type(A,'Matrix'(1,3))and type(B,'Matrix'(3,1))   then 
dp:=DotProduct(A,B,conjugate=false);
elif type(A,'Matrix'(3,1))and type(B,'Matrix'(1,3)) then
dp:=DotProduct(A,B,conjugate=false);
end if;
print("if = 0 coincident");
return dp
end proc,

proc(A::{Matrix(1,3),list})
option overload;
description "convert to/from cartesian";
if type(A,'Matrix'(1,3)) and A[1,3]<>0 then
[A[1,1]/A[1,3],A[1,2]/A[1,3]];
elif A::list then
<<A[1]|A[2]|1>>;
end if;
end proc,

proc(A::{Matrix(3,1)},{vars:=[x,y]})
option overload;
description "convert line vecor to expression";
A[1,1]*vars[1]+A[2,1]*vars[2]=-A[3,1];
end proc

]):

 

@Carl Love In Maple 2024.1 it is not working. Produces the same output as above. Works in 2023.2. Could you verify this please. 

I am using Windows 10.

Edit. Found a bug I think. If input is set to 2D mode the Isee works. If set to Maple Notation not workink.

I will investigate this later tonight.

Edit2:-The problem is purely dependant on Text or Math input. So not a big problem. I wonder what else that affects though?

@C_R Are you using a laptopr or desktop pc? I am not using a PC and sleep, it is set to never, hibernation is disabled. Only the screen goes off after 15min. So I haven't seen this particular problem. The PC is a 7th generation i7 from 2017.

@nm Yes that is basically what I meant.

@nm This is just a couple of ideas. Which monitor does windows have specified as the primary one? Thy swapping an that. Also if the graphinc card has another port try that too.

There are installation instructions on the site "Installation Instructions" by Ian M. Anderson and Charles G. Torre (usu.edu)

Failing that contact them the support link is in the left hand column.

Upload a worksheet or document. That command is useless on it's own.

@Rouben Rostamian  Very good. Maybe it is one of those situations where one needs to know the the format. Well I shall keep in mind your approach. It is simple.

3 4 5 6 7 8 9 Last Page 5 of 32