Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - _vince

Pages: [1] 2 3 ... 29
1
Programs / Re: Finger Painting in QBJS
« on: April 10, 2022, 03:53:41 pm »
going to pass this over to my cellphone:

https://v6p9d9t4.ssl.hwcdn.net/html/5574771/index.html?code=JFRvdWNoTW91c2UKRGltIFNoYXJlZCBBcyBTaW5nbGUgc3csIHNoCnN3ID0gODAwCnNoID0gNjAwzC5wacQxRG91YmxlCnBpID0gNCAqIEF0bigxKQoKU2NyZWVuIF9OZXdJbWFnZSjGUywgMzIpCiAgICDFS0FzIExvbmcgbiwgciwgbXgsIG15LCBtYiwgb8QNb215Cm4gPSAwClJlxC94KG4pyDQKcmVkaW0gecwTyFTmAJUgYngsIGJ5LCB0LCBiaW4KCnIgPSA1CkRvCuUAgW14ID0gX+UBBVjGEXnJEVnGEWIgPSAtxhJCdXR0b+YA28UcSWbGHzEgVGhlbsUTxAHkAK4xyQ7mALZfUHJlc2VydmXpAO/kAMjfJWflANrGbMQBeCgwKSA95AC1LSBzdyAvIDLJG3nGG3NoxBYgLSBteco3UFNldCAo5gFZynNEbyBXaGlsZecAw8ov9QEYyRnwASDJGfsBKMgBTGluZSAt6ACKLCBfUkdCKDMwLCDGBOsA6sQBSWbkALUgLeQCBykgXiAyICsgKG15xRF5xhE+IHLFCO0Bf8gBY2lyY2xlZukCUjPTcdA0b+UA+W140xnkAPnsAVbIAeUCkPYBlcgB5QKg7gGd0CPkAjRuICvrAjjIAf8CQN8t7AJIzClFbmQgSWbuAM7NDV9MaW1pdCA1MMkWTG9vcMoxJ2Nsb3NlIHRoZSBjb250b3VyyhvnARPkAq/KFecBBeQCqcoV8gD3J/AAw+0A6NEe7gMhJ3JlZHJhdyBzcGxpbmXKF3Bz5AMCc3cv5AJE5ACX5ASHL+QBi+QAj8tfZm9yIGk9MCB0byDqAlEnxE0gLcpAacxAaSnkAspyZ2IoMjU1LDAs7ADf6AKD2DrmApXWPG5leHTwA8TmAmDrAMTFD/AAxkZvciB05AUyIFRvIDEgU3RlcCAwLjAwMO4CXWLkAuvqAd/FE+QC5TDKdshO5AXZxU7yA2Ziae4E78w3asQaxDdp0R/KO8QGKiAobiAtIGopIC8gatEsTu0BCsk+5AC/YnggK8hCKDEgLSB05AQZxU3EDmkpKcQadCBeIGnECuQBgdJJ5AD1YnnfSc5J5AG9zUnyAKTnBO3pAbPkBonpAbFi6QT/5AH5IDAsIOsB+8VMxAnsA6XqA5DkA4ggJ3VudGlsIF9rZXloaeQB7TI35AVtClN1YukE+Sh46AQALCB5ygtyygtjyAvGfewHjngwLCB5MCwg5gNGeDAgPSDmA+J5xAvmAjdl5AXzcgrmBDnpBlB5MCA8IHjqAllJZiBlIDzlAkHwBafFTHkw8QT45QE8KOQFUuUAhyArIHkwKS0o5AHtyxEsIGMsIEJG3Tot0DrFEdQ65ADNZSArIDLkAd/qAL5FbHPqBEnOYuQBH8RReMhiyxHUYtA65ACTzTrFEdQ65QF/eDDkAo3NGOYAtC3lALTrAXLnAjjFdOQFtc59ciwgecd3xQvIccQ2U3ViCg==

2
QB64 Discussion / Re: Particle System
« on: April 10, 2022, 09:38:24 am »
Found it:
http://sdlbasic.epizy.com/showthread.php?tid=235

Here is a simple particle system that I converted from Basic256. It has a lot of comments that explain what each step does.

Note: On my machine, the 'polygon' command, causes sdlbasic to freeze. SetPixel, Bar, fillcircle and Ployline all work just fine.

Wow, what is Basic256!?  There's a successor to ModernBASIC 128?

3
Programs / Re: Just a silly "Hello World" Marquis
« on: April 07, 2022, 03:45:07 am »
It's not an Easter Egg if they're ALL like that, Steve, squirreled away in the obscurity of uselessness

4
Programs / Re: Just a silly "Hello World" Marquis
« on: April 06, 2022, 09:17:47 pm »
Code: QB64: [Select]
  1. _HelloWorld

5
Programs / Re: QBJS - QBasic for the Web
« on: April 06, 2022, 06:52:24 pm »
I'm very happy to have this game playable in the browser:

https://v6p9d9t4.ssl.hwcdn.net/html/5512918/index.html?qbcode=AnKnuDo0t7cAQQF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IQI4MLq5sqtFx3B1dHBpZWNlVp8K5ujC5OjwrlkFwblEEBcHhXKYLg8q5aCcm90VyqA3KIAA8qI/AeFcrANauURHNoaWZ0Vy6Vy6KS9y0QpcuBOTK5lITmuyApTEZrxzD5rjmGzXHMLmuOYTNYYl+m1e/UAL7x2sDx384SS3OmMzhKTcyTBYMjtYFjv7GsBx2meawDHc1un39Ajo0ujYy/yAEjdMenbHadgEX9/8AJ6RWk4BXabCJio5NLb/DmlISm6OWkc+w733u+8BIiz/D77fX33n7ufbXVf6LNnF9sIqNLo2Mt/F82c/rI799nI0AURvzVD/gpLNOM6E0M9oZgB9P8MxDS0JsJBbmSEGEnN7pDOhkBqjQyt2aqqGXhLiOzC2NLI4zlDOUM6Ea9QzmhC81VVVYfjhghivzVVQww0Vsc2XNVVVQz44T/mqqhmIY2c1VVD3Ph/H//xn54nuf+Jrh3Of+JXDzGFP//x5xN3EFYoLhhcPm4cT////GEzxdiODYwsbK4sLFdcNLFZp////w3ioxVn/////jFnwBwPyln/////y4l/PF3lgV/K+K4UOLEZvLTNyziwzlOzn7nWP3nVOXnRml/////wBQ8UpzL///+c/O0v//EbEUpf/+PueK84sHOTsdaX//j5nzgl//86541CX//wLn1KX//izn1L//50Z46uUv//GmKXipecVwesQLg5uCpf///iXCRm9yxBc+sIQKo34icF7l/////hY4jWfWFhxwwXuf//////iBOHZYeWz6n/////h4DTmV4dJ////gZa////ifPmv///43g2eJYXiVi/EkGciA10qzaT0HhpKMA0lDnSRDcNM1f///0yDsCo1f//SXSdf9PtO1r/p7D7Atf//B2GmNLcy7yeWBHT7QLRA6caQ6WMdMivJ5PLHjtBQkav//hv4+684beOsE7r///+lvS3rzpawNhXdf////8Bw2OF5wxbDIAeBnc4Hr//////4ZO6O8c8cHjDj/j5goAYam6Mrg4Rw/odCaD0Y4pUZ42vGp40bUu2OEPX/////UZr//////4Qd48wlqk8d6h1myqEBeM6x0PHNZ6MdapOBJwJODLHCAAhV/////wBgNf///wzV//9Qda//+GGDdOcLtev///6kYO05w96V/////4xAmFcm90YXRlwanCCcOnD54/PHFf////+LVwgjqI4fOCjgmv/////H8XDZ1cdmrhPjDu8c8Zw5wQgF0WV2Dx07h3jWzICDFhdl4CtiC9wHseJwns+LHFWqOqlOD2////4LX//8Nr3//92BAZEaXNwbGF5v//4bac3/wZgd7/4GOnDAAKlsrykNLpf/B+0fC9///Ah04dowyWyvKI3u7c1TLswL2uAp7l2Ay7VMuy6t///tDFU2VsZWN03LQ0Nhc2XhTf///+1h6D3YI4I2sAurhf/////CtyzQg4FOGzsEu09L2qBJreybq4bwrps5O09Lwgu/f/////hRpzf///+23oBjM4VW0htjKzOl/////8L7fd63//////+GMA9OeFcB9l1f///////8L7fe2rQk4S7LCs7zO913rvYhorw0unZl///////he///////hTTDfZb0du6v/////2+3//////8ex0axHeXZ9HeZ7CvYOHacP7Pq/////+L94v/////2z05v///+/noVG1Hf22QRyaWdodL/////75wT7Bf//////7Y4d07R2Di3tOr/////+AgEEmf/Q/Vrahmof1Y2fmym4AABD1wAAC1OMoWirgABn7cAAAhEL+h+skyStQzUP6s7JuMqySrgABmaEuAAGcHE3AAtejP/Ozr9FDdmIbI3u7dcAAIVa5ZzWncfoshcAAAzBalxDVmrBWqrgAAAQqzKyvWTWX1lXVj6yCzBnNwAACy7gAAFhcZ8WyrgAAGVXFtVwAAsTcAAAhVu+tes1q0sorVp6yS1OMgyirgABnKFuAAGfXE3AAyqqoLFsRAcLgABGDjKiwLgAZ1V+WhkTEZW50ZXK4AAZ6iriVorBWyrgAAEWZ64hkDIFsq4AAAFm/TTU064i4AABaNwAAtm4AAWtxZp6wp9qvp24AAfNxYG4AAZJxbSuAAFpcRcAAPsOIuAAHyuIuAAEZ25x+n8v5WXfKt3pgynpj3r4PyrNmZ8Uy5f0yfD1p97cAAP/+5P/zuABMj7+1ZUyGfoNwbHVzuAAE8yxYRVELdcAAAy9x/T5qwAAAWP/nE/JjPr5p8/3pv/3pr3r5pu/7dT5sJ//sImfTjvbg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eegAGKdQ9kzz0AJh456AAbx1J7pnnqABjXU0lo5JDesL5J8Sn3eykjozq3Mbo0t7cpNmetjbYS2DnoUk3NRqatOdCnEq3dMnoShPOPtpeegEoT7j7aXvQAK+pS1RaptP2wegAbLYKhLeDcJ5cfSPQAA2VNT9qq1TlI9AAANlrbKhM+DyJ58bDlXtrcqlM+bypen8pHoAAAGHuP9AAAAliwzvQAADytnoAABstbFWpuQ3LaPE25SfQAAAMPcf6AAABXJ5G6AAAeZt9AAANtrYvIcfyk+gAAAbauet0rU9Jea21VqfktzlOdAAAADeHH+gAAABsBOn0AAADztvoAABItvoAASLe6ABLt/oBhvQw3vQ29xJjsukJ3tWkjNqet4bbW2FnoYO8lW6dWqLVHQwd9LBis6E7ce70JEqXHm7N/QCYqlx94D3oAGxFZaptVWnrYXQAPlulcrJTdJD48mugAB8qaqLVdqrKaYd18VcrZX623bAVsrusuKhiI6ABNPnoBuHQ3rvQ/pCxGNsZWFyVHocO5lBMbY5JArXoTVVtvwkpT/H5YqV0A/FYmnbyYArnASqE50AD9KtpMdAAnyqbef64NJR0AAPxzPVVavy28nOgAAFW1t7oAABvdP+gABNPzoAH696AB/JvU90AAKu4rLGR0AAKmrJnfuK9QEMc0mOgAAFcVjjygtkSkdAAAA/5qstWUO/y2kfWDbAoeeloz0AAA/3oAASLoAFE/vAFG/vBQPeD+u2w/qVjz39

6
Programs / Re: Easter Egg Decorating
« on: April 01, 2022, 05:02:15 am »
I typed out the egg-case for that theory of everything egguation:

Code: QB64: [Select]
  1. 'scale
  2. s = 80
  3.  
  4. L = 5.4
  5. B = 4.1
  6. w = 0.4
  7. D = 3.2
  8.  
  9.  
  10. sw = 800
  11. sh = 600
  12. screen _newimage(sw, sh, 32)
  13.  
  14.  
  15. for xx=-0.5*L*s to 0.5*L*s
  16.         x = xx/s       
  17.         a = (L*L - 4*x*x)/(L*L + 8*w*x + 4*w*w)
  18.         y = 0.5*B*sqr(a)
  19.         'you can stop here for p(x) = x
  20.  
  21.         a = sqr(5.5*L*L + 11*L*w + 4*w*w)
  22.         a = a*(sqr(3)*B*L - 2*D*sqr(L*L + 2*w*L + 4*w*w))
  23.         a = a/(sqr(3)*B*L*(sqr(5.5*L*L + 11*L*w + 4*w*w) - 2*sqr(L*L + 2*w*L + 4*w*w)))
  24.  
  25.         aa = L*(L*L + 8*w*x + 4*w*w)
  26.         aa = aa/(2*(L - 2*w)*x*x + (L*L + 8*L*w - 4*w*w)*x + 2*L*w*w + L*L*w + L*L*L)
  27.         aa = 1 - aa
  28.  
  29.         y = y*(1 - a*aa)
  30.  
  31.         line (sw/2 + xx, sh/2 - s*y)-(sw/2 + xx, sh/2 + s*y)
  32.  
  33.  
  34.  

Note: I also got the coefficients by measuring a real egg with a ruler in centimeters, had to eyeball quite a bit.  You'd want some kind of scanner or at least calipers as the formula is pretty sensitive to certain parameters like w and D_{L/4}

7
Programs / Re: Easter Egg Decorating
« on: March 31, 2022, 07:28:46 am »
Yeah, a formula is useless if you don't know what the variables are!

@_vince So did you figure what * p(x) was to get the 2nd and 3rd line of that eq?

What is 2D sub L/4 on the 2 line of eq towards the right of center? are you kidding?


I think people have cartoon image of eggs being really pointy at one end. They aren't if you look at them.

Here's a more detailed description of the parameters:  https://nyaspubs.onlinelibrary.wiley.com/doi/10.1111/nyas.14771

The chicken eggs are not pointy but eggs of other bird species are, ie the "pyriform" shape https://bioone.org/journals/the-auk/volume-135/issue-4/AUK-18-38.1/The-pyriform-egg-of-the-Common-Murre-Uria-aalge-is/10.1642/AUK-18-38.1.full

That curve equation is supposed to be universal to all eggs.  From what I gather, you can set p(x) = x for a "good enough" approximation but there are several more complicated variants of p(x) that take into account more species of birds, ie that "pyriform" one

8
Programs / Re: Easter Egg Decorating
« on: March 31, 2022, 02:52:21 am »
I looked a little further into egg philosophy and was wondering if there was anything more substantial than "that looks pretty damn close".  It seems you can make fundamental and profound arguments for certain geometric patterns in nature like hexagonal beehives or numerical sequences in phyllotaxis, but has anyone done the same for eggs?  Can you say that there is one fundamental principle that maximizes bird survival (flight dynamics? egg production rate? idk) and here are the geometric implications of it on the egg shape, I don't think anyone has done it.  Is there a 1:1 function matching bird DNA data to egg curve?

It seems what they did do is take some basic geometric shapes (ovoid) that can approximate most eggs experimentally based on a few measurements then generalize to other basic geometric shapes like pyriform to boost your benchmark.  Like if you have a curve that is 99% accurate on a scan or photograph for 99% of all the eggs produced by 99% of all bird species on the planet and it only requires measuring egg height and max diameter (and maybe a couple of more) than it must be pretty damn good and close to true egg geometry? So far, the universal egg equation is allegedly:
Eggequation.jpg


just FYI, the above is just a curve y=f(x) with a bunch of parameters.  the +- in front implies symmetry over the x-axis.  A circle of radius R would be y = +-SQR(R^2 - x^2).  So you'd grab an egg from the fridge, measure L,w,B,D with a tape measure or scale or whatever (I have no idea what those parameters are), plug them in and plot y with respect to x and you should have a curve that is some 99% perfect to the egg you have.  Then, presumably, the actual egg is a surface of revolution of this curve.

9
Programs / Re: Easter Egg Decorating
« on: March 31, 2022, 12:11:37 am »
EDIT: Crazy math guys have a whole paper dedicated to this whole egguation!  https://nyjp07.com/index_egg_E.html
hahaha, Steve, egguation!

I was curious if any of those curves have a mathematical biology argument because otherwise there has to be near infinite types of curves that could fit an egg shape.  The easiest is take a photo and fit a polynomial spline.  I found this article for, allegedly, the true egg formula:  https://www.kent.ac.uk/news/science/29620/research-finally-reveals-ancient-universal-equation-for-the-shape-of-an-egg

10
Programs / Re: Easter Egg Decorating
« on: March 30, 2022, 11:27:40 am »
Code: QB64: [Select]
  1. _Title "Eggs o Dozens" 'b+ 2022-03-29
  2.  
interesting funny title, extremely fluent in the english language

Code: QB64: [Select]
  1. Const Xmax = 1200, Ymax = 400, Pi = _Pi
  2.  
Pi = _Pi, the first piece of genius code one can observes.  A philosophical criticism of the language

Code: QB64: [Select]
  1. If (x * x + (1.4 ^ x * 1.6 * y) ^ 2 - 1) <= .01 Then
  2.  
wow what is this? 1.4 to the power of x times y times 1.6! Wait, this can be written more simply as
Code: QB64: [Select]
  1. If (x * x + (1.4 ^ x * 1.6 * y) ^ 2) <= 1.01 Then
  2.  
...wait a second, this looks like a distance formula.  If one changes it to x*x + y*y < 1 they become circles not eggs! What spectacular mathematical intuition!

Code: QB64: [Select]
  1. a = _Atan2(y, x)
  2. d = scale * Sqr(x * x + y * y)
  3. PSet (xc + d * Cos(a + radianAngle), yc + d * Sin(a + radianAngle))
  4.  
oh dear, polar coordinates again.  What are we doing, bplus? Why not just
Code: QB64: [Select]
  1. PSet (xc + scale * x, yc + scale * y)
  2.  

11
QB64 Discussion / Re: Time to bring in at least 150K new users to QB64
« on: March 28, 2022, 09:47:07 pm »
in 5 years when the ARM processor becomes standard with new computers
please elaborate

12
QB64 Discussion / Re: What's your philosophy about constants?
« on: March 26, 2022, 08:29:24 pm »
That one works, but I wonder if relying on the compiler to produce the value of some other calculated number to use as a constant could cause an inconsistency if one program was compiled on a 32-bit and another on a 64-bit system?

Pete

You are right, 32-bit machines are incapable of computing 64-bit values, just as Android phones don't do negative numbers, and your TV remote only deals with even numbers.  Be careful out there, guys.

13
QB64 Discussion / Re: What's your philosophy about constants?
« on: March 24, 2022, 10:37:47 pm »
My philosophy on constants:  it's something between a micro-optimization and a sanity check for a symbolic representation of a literal (not live-computed) value.  I.e.:  it's ugly to type 3.141593 every time you need it so CONST pi=4*atn(1) lets the compiler calculate it for you at compile time then type it in for you.  The physical result is that it's global, just like a literal "3.1415.." is, and should compile with the same performance as a literal value.  What Steve and the gang actually do with it is none of my business, as long as my code looks pretty.

14
Couldn't leaf well enough alone, could you?

had to highlight that in bold for us slow wits?

15
Programs / Re: Rotating Pyramid
« on: March 08, 2022, 07:16:48 am »
B+ mod #2

seems my calculations are inaccurate, maybe someone can fix why

Code: QB64: [Select]
  1. defdbl a-z
  2.  
  3. const d = 300
  4. const z0 = 550
  5. const oy = 00
  6.  
  7. pi = 4*atn(1)
  8.  
  9. dim x(5), y(5), z(5)
  10.  x( 0) =  0:  y( 0) = 70:  z( 0) =  0
  11.  x( 1) = 70:  y( 1) =-70:  z( 1) = 70
  12.  x( 2) =-70:  y( 2) =-70:  z( 2) = 70
  13.  x( 3) =-70:  y( 3) =-70:  z( 3) =-70
  14.  x( 4) = 70:  y( 4) =-70:  z( 4) =-70
  15.  x( 5) = 70:  y( 5) =-70:  z( 5) = 70
  16.  
  17. zoom = 4
  18.  
  19. sw = 640
  20. sh = 480
  21.  
  22. screen _newimage(sw,sh,32)
  23.  
  24. a = 0
  25.         cls
  26.  
  27.         a = a + 0.01
  28.  
  29.         xx = x(0)
  30.         yy = y(0)
  31.         zz = z(0)
  32.  
  33.         rot yy, zz, a
  34.         rot xx, zz, a
  35.  
  36.         proj p0, q0, xx, yy, zz
  37.  
  38.         'draw all triangles
  39.         for i=1 to 4
  40.                 x1 = x(i)
  41.                 y1 = y(i)
  42.                 z1 = z(i)
  43.        
  44.                 rot y1, z1, a
  45.                 rot x1, z1, a
  46.                
  47.        
  48.                 x2 = x(i + 1)
  49.                 y2 = y(i + 1)
  50.                 z2 = z(i + 1)
  51.        
  52.                 rot y2, z2, a
  53.                 rot x2, z2, a
  54.        
  55.                 c = _rgb(35,35,35)
  56.        
  57.                 proj p, q, x1, y1, z1
  58.                 pset (sw/2 + zoom*p0, sh/2 - zoom*q0 + oy), c
  59.                 line -(sw/2 + zoom*p, sh/2 - zoom*q + oy), c
  60.        
  61.                 proj p, q, x2, y2, z2
  62.                 line -(sw/2 + zoom*p, sh/2 - zoom*q + oy), c
  63.                 line -(sw/2 + zoom*p0, sh/2 - zoom*q0 + oy), c
  64.         next
  65.  
  66.         'draw the visible triangles
  67.         for i=1 to 4
  68.                 x1 = x(i)
  69.                 y1 = y(i)
  70.                 z1 = z(i)
  71.  
  72.                 rot y1, z1, a
  73.                 rot x1, z1, a
  74.  
  75.                 x2 = x(i + 1)
  76.                 y2 = y(i + 1)
  77.                 z2 = z(i + 1)
  78.  
  79.                 rot y2, z2, a
  80.                 rot x2, z2, a
  81.        
  82.                 'vector cross product
  83.                 cz = (x1 - xx)*(y2 - yy) - (y1 - yy)*(x2 - xx)
  84.  
  85.                 if cz > 0 then
  86.                         c = _rgb(255,255,255)
  87.        
  88.                         proj p, q, x1, y1, z1
  89.                         pset (sw/2 + zoom*p0, sh/2 - zoom*q0 + oy), c
  90.                         line -(sw/2 + zoom*p, sh/2 - zoom*q + oy), c
  91.        
  92.                         proj p, q, x2, y2, z2
  93.                         line -(sw/2 + zoom*p, sh/2 - zoom*q + oy), c
  94.                         line -(sw/2 + zoom*p0, sh/2 - zoom*q0 + oy), c
  95.                 end if 
  96.         next
  97.  
  98.         'draw the base
  99.         xx = x(1)
  100.         yy = y(1)
  101.         zz = z(1)
  102.         rot yy, zz, a
  103.         rot xx, zz, a
  104.  
  105.         x1 = x(2)
  106.         y1 = y(2)
  107.         z1 = z(2)
  108.         rot y1, z1, a
  109.         rot x1, z1, a
  110.  
  111.         x2 = x(3)
  112.         y2 = y(3)
  113.         z2 = z(3)
  114.         rot y2, z2, a
  115.         rot x2, z2, a
  116.  
  117.         cz = (x1 - xx)*(y2 - yy) - (y1 - yy)*(x2 - xx)
  118.  
  119.         if cz < 0 then
  120.                 c = _rgb(255,255,255)
  121.                 proj p0, q0, xx, yy, zz
  122.                 pset (sw/2 + zoom*p0, sh/2 - zoom*q0 + oy), c
  123.                 for i=2 to 5
  124.                         xx = x(i)
  125.                         yy = y(i)
  126.                         zz = z(i)
  127.  
  128.                         rot yy, zz, a
  129.                         rot xx, zz, a
  130.  
  131.                         proj p, q, xx, yy, zz
  132.                         line -(sw/2 + zoom*p, sh/2 - zoom*q + oy), c
  133.                 next
  134.         end if
  135.  
  136.         _display
  137.         _limit 30
  138.  
  139. 'rotate
  140. sub rot(x, y, a)
  141.         xx = x*cos(a) - y*sin(a)
  142.         yy = x*sin(a) + y*cos(a)
  143.         x = xx
  144.         y = yy
  145.  
  146. 'perspective projection
  147. sub proj(p, q, x, y, z)
  148.         dz = z0 + z
  149.         p = x*d/dz
  150.         q = y*d/dz
  151.  
  152.  

Pages: [1] 2 3 ... 29