mersenneforum.org pari
 User Name Remember Me? Password
 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
Dartmouth NS

203428 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
Dartmouth NS

2×3×23×61 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 598710 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     "name field" Jun 2011 Thailand 19×541 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
Dartmouth NS

2×3×23×61 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 Dartmouth NS 100000111000102 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     "name field" Jun 2011 Thailand 19×541 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

22·79 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
Dartmouth NS

2×3×23×61 Posts

Quote:
 Originally Posted by devarajkandadai Wd be glad to receive step by step instruction for drawing rectwindow.
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 2,999 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 06:55.

Fri Feb 3 06:55:39 UTC 2023 up 169 days, 4:24, 1 user, load averages: 0.54, 0.67, 0.80

Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.

≠ ± ∓ ÷ × · − √ ‰ ⊗ ⊕ ⊖ ⊘ ⊙ ≤ ≥ ≦ ≧ ≨ ≩ ≺ ≻ ≼ ≽ ⊏ ⊐ ⊑ ⊒ ² ³ °
∠ ∟ ° ≅ ~ ‖ ⟂ ⫛
≡ ≜ ≈ ∝ ∞ ≪ ≫ ⌊⌋ ⌈⌉ ∘ ∏ ∐ ∑ ∧ ∨ ∩ ∪ ⨀ ⊕ ⊗ 𝖕 𝖖 𝖗 ⊲ ⊳
∅ ∖ ∁ ↦ ↣ ∩ ∪ ⊆ ⊂ ⊄ ⊊ ⊇ ⊃ ⊅ ⊋ ⊖ ∈ ∉ ∋ ∌ ℕ ℤ ℚ ℝ ℂ ℵ ℶ ℷ ℸ 𝓟
¬ ∨ ∧ ⊕ → ← ⇒ ⇐ ⇔ ∀ ∃ ∄ ∴ ∵ ⊤ ⊥ ⊢ ⊨ ⫤ ⊣ … ⋯ ⋮ ⋰ ⋱
∫ ∬ ∭ ∮ ∯ ∰ ∇ ∆ δ ∂ ℱ ℒ ℓ
𝛢𝛼 𝛣𝛽 𝛤𝛾 𝛥𝛿 𝛦𝜀𝜖 𝛧𝜁 𝛨𝜂 𝛩𝜃𝜗 𝛪𝜄 𝛫𝜅 𝛬𝜆 𝛭𝜇 𝛮𝜈 𝛯𝜉 𝛰𝜊 𝛱𝜋 𝛲𝜌 𝛴𝜎𝜍 𝛵𝜏 𝛶𝜐 𝛷𝜙𝜑 𝛸𝜒 𝛹𝜓 𝛺𝜔