RubyNL wrote:
S: Does my site work? When I try it it works fine, but Ralph pmed that it wasnt!
I gave it another try, and, it worked!
I read your code on the 3d sphere. Works good! I did change your code slightly, as commented below, for the second FOR...NEXT loop:
Code: Select all
FOR y = 0 yo 299
ecuation = r^2 - (x - spherex)^2 - (y - spherey)^2
IF equation >0 THEN
nz! = SQR(equation)/r
PSET (x, .85 * y) , nz! * 255
END IF
NEXT y
First, I simplified slightly your "equation ="
Second, by using an aspect ratio of .85 (the multiplier in the PSET(), I now get a nice, ROUND, sphere.
It is your code, though, so, what do you say?
Edited 3:22 pm:
I just went through your final program, works very good! Congratulations! Of course, I just had to make the pseudosphere into a true sphere! Here's how, using an aspect ratio of 0.78:
Code: Select all
'PSet the point:
PSET (xc + x, yc + .78 * y), ((u + a) XOR (v + b)) AND 255
Second Edit, 5:15 pm:
I don't understand what the "AND 255" at the end of the above PSET() line does. Remarking it out, I didn't notice any change.
Also, remarking out 'XOR (v+b) AND 255 gave me an almost solid black and grey sphere, which almost looks like a planet gyrating between night and day...almost. But, then, one notices that the internal curve of the nighttime-or daytime-crescents do not pass through the poles, that is, they are not true meridians. Going back to the original, you rotting sphere shows that effect, too. I wonder how that could be changed to show true meridians?
Ralph, with QuickBASIC 4.5, operating under Windows XP, wiht anHP LaserJet 4L Printer. Bilingual in English/Spanish