Loading [MathJax]/jax/output/HTML-CSS/jax.js

First time here? Check out the FAQ!

Ask Your Question
0

Plotting a set of R^2 using three variables

asked 1 year ago

pfeifhns gravatar image

I have a set defined as 0<=x<=y, 0<=z<=3, 1<= x^2+y^2 <= 4

the last equation determines circles with raduis 1 and 2, the first equation limits these circles to a quarter in the first quadrant, the second equation makes a solid out of this. How can I plot these equations in sagemath?

Thank you for your effort,

HP

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
1

answered 1 year ago

achrzesz gravatar image

Some workaround:

E = EuclideanSpace(3)
cylindrical.<rh,ph,z> = E.cylindrical_coordinates()
cartesian.<x,y,z> = E.cartesian_coordinates()
p=cylindrical.plot(cartesian,ranges={rh:(1,2),ph:(0,pi/4),z:(0,3)},
    number_values={rh:2,ph:15,z:2},thickness=2,
    color={rh:'red', ph:'green',z:'blue'},label_axes=False)
p.show(frame=False)
Preview: (hide)
link
0

answered 1 year ago

eric_g gravatar image

For the subset of R2, use the function region_plot:

x, y = var('x y')
region_plot([0<=x, x<=y, 1<=x^2+y^2, x^2+y^2<= 4], (x, -2, 2), (y, -2, 2))

For more details, see the description of region_plotat the end of the page https://doc.sagemath.org/html/en/refe...

For a subset of R3, unfortunately there does not seem to be any function equivalent to region_plot in Sage...

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 1 year ago

Seen: 185 times

Last updated: Oct 02 '23