ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Tue, 23 Jun 2020 13:09:08 +02003d image plot SAGEMATH 9.0 Notebookhttps://ask.sagemath.org/question/52179/3d-image-plot-sagemath-90-notebook/Hi! I am using SAGEMATH 9.0 Notebook, and when I make 3d images, theye are always viewed from the same angle of vision, but i want another angle view, how can i change it? I am currently using the .show(viewer='canvas3d')creyesm1992Tue, 23 Jun 2020 13:09:08 +0200https://ask.sagemath.org/question/52179/drawing the corners for the inner parallelogram(solved)https://ask.sagemath.org/question/44218/drawing-the-corners-for-the-inner-parallelogramsolved/Hello,
i have the following plot, how do i draw the corners of the inner parallelogram in it.
If i did something overcomplicated just improve my code ( i'm a beginner).
g = Graphics()
g += text('g1', (10,4.5))
g += plot(2/5*x + 1,(x,-4,10)) #g1
#gradient triangle
g += line([(0,1), (5,1)], rgbcolor=('#00c736'))
g += text('kw = 5', (2.5,0.5), rgbcolor=('#00c736'))
g += line([(5,1), (5,3)],rgbcolor=('#f6a200'))
g += text('ks = 2', (5.5,2), rgbcolor=('#f6a200'))
g += text('g2', (10,1.5))
g += plot(2/5*x - 2,(x,-4, 10)) #g2
g += text('h1', (10,-1.5))
g += plot(-1/2*x+1,(x,-4, 10)) #h1
g += text('h2', (10,-4.5))
g += plot(-1/2*x+4,(x,-4, 10)) #h2
#corners
g += arc((0.5,1), 1, sector=(pi*0,-pi/4+0.1))
g += arc((0.5,1), 1, sector=(pi*0,pi/4-0.2))
g.show()
can't upload a picture sorry insufficient karma :(.
and how do i change the steps at the x and y -axis to 1.
thanks in advance !neoryWed, 07 Nov 2018 21:17:26 +0100https://ask.sagemath.org/question/44218/Orienting and Saving 3D Plotshttps://ask.sagemath.org/question/42190/orienting-and-saving-3d-plots/Hi !
I am very new to using Sage, I've started only a few weeks ago. I hope my inability to answer anyone's questions won't ruin my "karma" ! Anyway, here is my first question:
I've been experimenting with plotting 3D objects, so far. Right now, I am plotting simple cubes scattered in space. With great satisfaction, I've noticed I could initialize the point of view of my 3D plot by specifying:
orientation(0,0,0,0)
That initializes to X being horizontal, Y vertical, and Z orthogonal to the screen. Then, I specify:
G.rotate([1,0,0],pi/4).show(aspect_ratio=[1,1,1],frame=False)
and get a point of view I really like. My goal is to generate a bunch of .png files of my cubes from different points of view, and I was hoping to use this rotate() functionality with a [ for i in range(n)] type statement. Therefore, I'd really like SAGE to write a bunch of .png files without me generating images one by one and saving manually. So I tried using the save() function, like so:
G.rotate([1,0,0],pi/4).save("MyImage.png",aspect_ratio=[1,1,1],frame=False)
Here is my problem: when I use the save() function, my previous orientation(0,0,0,0) statement is completely overridden, and the resulting MyImage.png I get is rotated according to rotate([1,0,0],pi/4), but not from the intented X being horizontal, Y vertical, and Z orthogonal to the screen configuration, rather, from the default point of view show() gives me, if I do not specify orientation(0,0,0,0).
Why is it so, and how can I fix this ?
Thank you very much,
Turiel.TurielFri, 27 Apr 2018 18:18:47 +0200https://ask.sagemath.org/question/42190/connecting plots by lineshttps://ask.sagemath.org/question/38845/connecting-plots-by-lines/There are 2 plots in a graphics_array (e.g. sin and cos). How do I "connect" these plots with connecting lines (e.g. a dashed line at angle=pi)?Chris_Mon, 18 Sep 2017 15:21:55 +0200https://ask.sagemath.org/question/38845/