Author Topic: Dynamic Compiling: Surfaces  (Read 6772 times)

0 Members and 3 Guests are viewing this topic.

Charles Pegge

  • Guest
Dynamic Compiling: Surfaces
« 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)


.

RobbeK

  • Guest
Re: Dynamic Compiling: Surfaces
« Reply #1 on: July 20, 2014, 11:48:15 AM »
Splendid,

How far goes the dynamic compiling ?? 100% compatible syntax for the compiler ?

best, Rob

Charles Pegge

  • Guest
Re: Dynamic Compiling: Surfaces
« Reply #2 on: July 20, 2014, 12:39:46 PM »
Almost. Avoid defining static and global variables within the code. Use parental globals instead.

Mike Lobanovsky

  • Guest
Re: Dynamic Compiling: Surfaces
« Reply #3 on: July 21, 2014, 08:55:13 AM »
Charles,

You made my day! OMG do I love such tchotchkes! :D

Charles Pegge

  • Guest
Re: Dynamic Compiling: Surfaces
« Reply #4 on: July 21, 2014, 11:40:58 PM »
tchotchke: A new word for my vocabulary. Thanks Mike :)

http://www.oxforddictionaries.com/definition/english/tchotchke




Shall I make a Lispish version?

Mike Lobanovsky

  • Guest
Re: Dynamic Compiling: Surfaces
« Reply #5 on: July 22, 2014, 12:44:32 PM »
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


Quote
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. :)

JRS

  • Guest
Re: Dynamic Compiling: Surfaces
« Reply #6 on: July 22, 2014, 12:53:19 PM »
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?

Charles Pegge

  • Guest
Re: Dynamic Compiling: Surfaces
« Reply #7 on: July 22, 2014, 01:13:15 PM »
 ;D





Digressing slightly, I found an interesting blog on 3d printing:

https://medium.com/@sandersk/why-i-broke-up-with-makerbot-eee36e197e3a




Mike Lobanovsky

  • Guest
Re: Dynamic Compiling: Surfaces
« Reply #8 on: July 22, 2014, 01:35:12 PM »
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,



I'm going to order such a knitted dilly with my mother-in-law first thing tomorrow morning. :D
« Last Edit: July 22, 2014, 02:15:26 PM by Mike Lobanovsky »

JRS

  • Guest
Re: Dynamic Compiling: Surfaces
« Reply #9 on: July 22, 2014, 02:43:59 PM »
Quote
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


Mike Lobanovsky

  • Guest
Re: Dynamic Compiling: Surfaces
« Reply #10 on: July 22, 2014, 03:45:43 PM »
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

JRS

  • Guest
Re: Dynamic Compiling: Surfaces
« Reply #11 on: July 24, 2014, 11:22:12 PM »
Going to Poland is on my short list. Maybe we can meet for a beer.


RobbeK

  • Guest
Re: Dynamic Compiling: Surfaces
« Reply #12 on: July 25, 2014, 12:59:06 AM »
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

.

Mike Lobanovsky

  • Guest
Re: Dynamic Compiling: Surfaces
« Reply #13 on: July 25, 2014, 05:39:34 AM »
@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. :)

Charles Pegge

  • Guest
Re: Dynamic Compiling: Surfaces
« Reply #14 on: July 25, 2014, 12:42:28 PM »
A multi-line tchotchke might be more useful than my single-liner. Then it would be possible to explore complex surfaces.