ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 07 Nov 2018 23:33:17 -0600drawing the corners for the inner parallelogram(solved)http://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 !Wed, 07 Nov 2018 14:17:26 -0600http://ask.sagemath.org/question/44218/drawing-the-corners-for-the-inner-parallelogramsolved/Comment by neory for <p>Hello,</p>
<p>i have the following plot, how do i draw the corners of the inner parallelogram in it. </p>
<p>If i did something overcomplicated just improve my code ( i'm a beginner).</p>
<pre><code>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()
</code></pre>
<p>can't upload a picture sorry insufficient karma :(.</p>
<p>and how do i change the steps at the x and y -axis to 1.</p>
<p>thanks in advance !</p>
http://ask.sagemath.org/question/44218/drawing-the-corners-for-the-inner-parallelogramsolved/?comment=44221#post-id-44221g+=arc((0,0), 1, sector=(pi/4,3*pi/4)) looks right, it should be placed at the points p1(1|1) to the point p2(1|1.5) with a 90° rotation in the right direction.
Thanks I can work out my solution now the only question that remains is how can I add the angle designations to it?
sry for begin unclear, i don't know how the German word "Winkel" is called in English. I mean the corners inside the parallelogram, i need just a small section of the circle and how do I add the Greek letter small alpha into it.Wed, 07 Nov 2018 23:33:17 -0600http://ask.sagemath.org/question/44218/drawing-the-corners-for-the-inner-parallelogramsolved/?comment=44221#post-id-44221Comment by dazedANDconfused for <p>Hello,</p>
<p>i have the following plot, how do i draw the corners of the inner parallelogram in it. </p>
<p>If i did something overcomplicated just improve my code ( i'm a beginner).</p>
<pre><code>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()
</code></pre>
<p>can't upload a picture sorry insufficient karma :(.</p>
<p>and how do i change the steps at the x and y -axis to 1.</p>
<p>thanks in advance !</p>
http://ask.sagemath.org/question/44218/drawing-the-corners-for-the-inner-parallelogramsolved/?comment=44220#post-id-44220I'm having trouble understanding the question. What is a angle circle? From your code, I think you might mean arc. Your commented line is drawing the arc for an ellipse. The documentation is [here](http://doc.sagemath.org/html/en/reference/plotting/sage/plot/arc.html?highlight=arc#module-sage.plot.arc) and at the bottom of the page indicates you would want something like
g+=arc((0,0), 1, sector=(pi/4,3*pi/4)) but I'm not sure where you want it to start and stop. What does "and add the alpha character into it" mean?Wed, 07 Nov 2018 20:06:15 -0600http://ask.sagemath.org/question/44218/drawing-the-corners-for-the-inner-parallelogramsolved/?comment=44220#post-id-44220