mersenneforum.org pari
 Register FAQ Search Today's Posts Mark Forums Read

 2012-08-28, 09:41 #12 davieddy     "Lucan" Dec 2006 England 2·3·13·83 Posts Initialize x = x + dx y= y + dy dx = dx - k*y dy = dy - k*x PLOT (x,y) Keep taking the medicine TRUST ME D
2012-08-28, 11:49   #13
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

100000110000002 Posts

Quote:
 Originally Posted by devarajkandadai Code: ? plot(x=-5,5,sqrt(25-x^2)) 4.9993701 |''''''''''''''''''''''__xxx""""""""xxx__''''''''''''''''''''''| | _xx" "xx_ | | _x" "x_ | | _x x_ | | _" "_ | | _x x_ | | _ _ | | x x | | " " | | " " | | " " | | " " | | x x | | | | " " | | | |x x| |: :| |: :| : : : : 0 _,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,_ -5 5 (10:20) gp > I got the above which is actually a semi-circle; how do I get a complete circle pl?
well each x value would need 2 solutions I would think:

Quote:
 plotlines(w,X,Y,{flag=0}): draws an open polygon in rectwindow w where X and Y contain the x (resp. y) coordinates of the vertices. If X and Y are both single values (i.e not vectors), draw the corresponding line (and move cursor). If (optional) flag is non-zero, close the polygon.
may work but you need a rectwindow made first

2012-08-28, 14:51   #14
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

26×131 Posts

Quote:
 Originally Posted by axn Something that almost works Code: plot(x=-5,5,sqrt(25-x^2)); plot(x=-5,5,-sqrt(25-x^2))
yeah I tried doing the ploth version it still needs a copy and paste plus some resizing lol
Attached Thumbnails

Last fiddled with by science_man_88 on 2012-08-28 at 15:05

 2012-08-29, 04:03 #15 CRGreathouse     Aug 2006 176116 Posts Here's a crude technique that works for that case: Code: ploth(x=-5,5,sqrt(25-x^2)*(-1)^random(2),64)
 2012-08-29, 10:31 #16 LaurV Romulan Interpreter     Jun 2011 Thailand 5·1,889 Posts If the threads were merged, then OP's post #8 and my post #10 should be deleted. And this current post too. Thanks.
2012-08-29, 13:59   #17
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

838410 Posts

Quote:
 Originally Posted by CRGreathouse Here's a crude technique that works for that case: Code: ploth(x=-5,5,sqrt(25-x^2)*(-1)^random(2),64)
Code:
ploth(x=-5,5,(5-abs(x))*(-1)^random(2),64)
works for a rough diamond

 2012-08-29, 21:41 #18 science_man_88     "Forget I exist" Jul 2009 Dumbassville 26·131 Posts how could you ploth a rectwindow with multiple curves/lines in it, I know how to make rectwindows and I know how write to a rectwindow I don't see how to ploth the results. edit: think I found it (plotrecthraw) but don't see how to get it working,okay got it working but not exactly what I wanted by the looks of it. Last fiddled with by science_man_88 on 2012-08-29 at 21:53
 2012-08-30, 02:59 #19 LaurV Romulan Interpreter     Jun 2011 Thailand 5·1,889 Posts Why my solution in post #9 is not good for you? Pari's "ploth" is a very clever function, it can plot vectors of functions, even recursion, in many different parametric ways. Try playing with the last "1", make it "0" or none. Or RTFM, it has good examples. If you keep that fixed idea of using the sqrt(blabla) function, why not try: ploth(x=-5,5,[sqrt(25-x^2),-sqrt(25-x^2)]) edit: try this for a start: ploth(x=-5,5,[x^3/25,5*sin(x),x*sin(20*x)/5-1.1*x,sqrt(25-x^2),-sqrt(25-x^2)]) Last fiddled with by LaurV on 2012-08-30 at 03:14
2012-08-31, 03:38   #20

May 2004

1001111002 Posts
pari

Quote:
 Originally Posted by science_man_88 how could you ploth a rectwindow with multiple curves/lines in it, I know how to make rectwindows and I know how write to a rectwindow I don't see how to ploth the results. edit: think I found it (plotrecthraw) but don't see how to get it working,okay got it working but not exactly what I wanted by the looks of it.
Wd be glad to receive step by step instruction for drawing rectwindow.

2012-08-31, 12:22   #21
science_man_88

"Forget I exist"
Jul 2009
Dumbassville

203008 Posts

Quote:
see that's kinda my problem I can enter data into them but can't get them by name:

plotinit() initializes a rectwindow
plotrecth() writes data to a rectwindow
plotclip() clips the data to the correct size.
but I can't figure out which one draws the results.

Last fiddled with by science_man_88 on 2012-08-31 at 12:26

 2012-08-31, 18:08 #22 kar_bon     Mar 2006 Germany 33·107 Posts A simple graph of a circle in Pari: Code: ploth(X=0,2*Pi,[sin(X),cos(X)], "Parametric")

 Similar Threads Thread Thread Starter Forum Replies Last Post JM Montolio A Lounge 11 2018-03-08 06:26 carpetpool Programming 6 2017-12-21 06:04 paul0 Programming 2 2015-11-17 13:04 skan Miscellaneous Math 0 2012-12-16 00:13 CRGreathouse Software 2 2009-03-13 04:22

All times are UTC. The time now is 17:58.

Tue May 11 17:58:14 UTC 2021 up 33 days, 12:39, 1 user, load averages: 2.99, 2.92, 2.93