Oxygen Basic
Programming => Example Code => General => Topic started by: Charles Pegge on July 20, 2014, 10:39:03 AM
-
Binary attached, including Oxygen.dll.
The full source code can be found in the latest Oxygen: projectsA/OpenglCns/SurfaceFormula.o2bas
A selection of formulae to try:
fy=1-hypot(fx,fz)
fy=abs(fx*fz)
fy=abs(fx*fz)^2
fy=abs(fx*fz)^.5
fy=lin(abs(fx*fz))
fy=1-(fx*fx+fz*fz)
fy=cos(fx*fz*8 ) *.25
fy=cos(fx*fz*16)*.125*(1-fx)
fy = -(fx*fx*4+fz*fz*4) : fy=exp(f)
.
-
Splendid,
How far goes the dynamic compiling ?? 100% compatible syntax for the compiler ?
best, Rob
-
Almost. Avoid defining static and global variables within the code. Use parental globals instead.
-
Charles,
You made my day! OMG do I love such tchotchkes! :D
-
tchotchke: A new word for my vocabulary. Thanks Mike :)
http://www.oxforddictionaries.com/definition/english/tchotchke
(http://api.ning.com/files/ua11aq*LquKSISPCaWS*5galHrJS3lQ8NIr2rWLMvxjmBKzNdW1dCjlWflTk9fD6m8oNEvW5E8KtkVUoQWhf*7J3YiM8NuZ9NmTZ9gB*8cg_/pookyoriginal.jpg)
Shall I make a Lispish version?
-
tchotchke: A new word for my vocabulary.
Hi Charles,
You probably won't believe it but all the three Eastern Slavonic languages (Belarusian, Ukrainian, Russian) have the word цацки - pronounced `tsatskee - that has the exact same meanings: i) toys and ii) worthless gimmiks.
I don't know the exact etymology of this word in English but judging by its horrible spelling, it might be just another one of a few borrowings that the West has acquired from the East such as vodka, sputnik, perestroika, and robot. Hehe, and Nikita too though that one is an obsolete and strictly masculine name here. :D
Shall I make a Lispish version?
No thanks, not for me. I'm pretty happy with what I already have - a legible and neat piece of procedural code. :)
-
And they say English is a hard language to learn?
I wonder how many of those Slavonic words are actually drunken slurs that took on meaning?
-
;D
(http://therealrebeccadiamond.com/wp-content/uploads/2011/08/yoda-150x150.jpg)
Digressing slightly, I found an interesting blog on 3d printing:
https://medium.com/@sandersk/why-i-broke-up-with-makerbot-eee36e197e3a
-
John,
I wonder how many of those Slavonic words are actually drunken slurs that took on meaning?
You're at serious risk of getting your Stetson hat thrown down in the dust and stomped upon. There are currently over 950,000 permanently resident carriers of Russian as their primary (and sometimes, the only) language in the States. ;)
[EDIT] You are a bearer of a proud Slavonic surname Spikowski that looks twenty four carat Polish. How could you?
Charles,
(http://therealrebeccadiamond.com/wp-content/uploads/2011/08/yoda-150x150.jpg)
I'm going to order such a knitted dilly with my mother-in-law first thing tomorrow morning. :D
-
You are a bearer of a proud Slavonic surname Spikowski that looks twenty four carat Polish. How could you?
Yep. 100% Polish and the only John R. Spikowski in the world. I grew up in the Pollack joke era and slinging a little mud just seems natural. :D
-
Yep. 100% Polish and the only John R. Spikowski in the world. I grew up in the Pollack joke era and slinging a little mud just seems natural. :D
OK then I'll be pulling my horses a little - we're sorta fellow countrymen with you, John. In fact, I'm currently living less than a mile away from the Rzeczpospolita Polska state border, east of it. :D
-
Going to Poland is on my short list. Maybe we can meet for a beer.
-
Hi Charles, all ...
"Almost. Avoid defining static and global variables within the code. Use parental globals instead." ...
Well, it's somewhat the same in Lisp , wrote something (picked up an idea from some time ago (tB + O2) , the same L-system but now with two parameters (called M and N ) .. with this I finally will be able to set up those L systems in 3D ) but for fun I added an optional complex mapping (see attachm. , the arrow ).
This is compiled code, but the "z-mapping" is a function (it has an operator (in fact it will accept almost every Lisp code ) - it is handled/compiled by an (eval .... ) , but also here, it only will work when Z is declared global (defvar Z ... ) , local with
(let ((.. ) (..) ... ) or let* it will not work. (and probably local defined functions as (flet ... ) and (labels .. ) wil not work either ..
best Rob
.
-
@Rob:
Hi,
This one looks very attractive! I'll be waiting for the code to experiment with.
@John:
That would be problematic with our citizenships. Getting a Belarusian visa is a real PITA for US residents while Belarusians are not very welcome on the Schengen territory that Poland belongs to. That's not impossible but highly problematic indeed for just a beer or two. Have a nice time in Warsaw and Krakow though - these are beautiful cities and they will also give you some idea of what my own country will look like when we do away with that bloody usurper we're under now. :)
-
A multi-line tchotchke might be more useful than my single-liner. Then it would be possible to explore complex surfaces.
-
... multi-line tchotchke ...
Happy sailing! :D
-
Hi Mike,
Can the CLisp source code be of any help ? (or in NewLisp -- without the complex mapping then (it doesn't have native complex functions/numbers ? ).
... seems that word also exists in Yiddish (meaning a combo of beauty and uselessness ) ... probably "archetyped" by the dumb blond with the big b 8) 8)bies ....
(without joking, I started to study some Yiddish books after reading Bulgakov's " Master and Margerita " -- I was intrigued by the Pontius Pilatus chapter )..
best Rob
(ah , yes there's also карандаш ... famous pencil, made in Swiss ;)