Logo by Pauldelbrot - Contribute your own Logo!

END OF AN ERA, FRACTALFORUMS.COM IS CONTINUED ON FRACTALFORUMS.ORG

it was a great time but no longer maintainable by c.Kleinhuis contact him for any data retrieval,
thanks and see you perhaps in 10 years again

this forum will stay online for reference
News: Check out the originating "3d Mandelbulb" thread here
 
*
Welcome, Guest. Please login or register. October 03, 2018, 02:05:23 PM


Login with username, password and session length


The All New FractalForums is now in Public Beta Testing! Visit FractalForums.org and check it out!


Pages: 1 ... 3 4 [5] 6 7   Go Down
  Print  
Share this topic on DiggShare this topic on FacebookShare this topic on GoogleShare this topic on RedditShare this topic on StumbleUponShare this topic on Twitter
Author Topic: A few formulas (For Luca... :D)  (Read 6868 times)
Description: Who can change the name of this thread... :D
0 Members and 1 Guest are viewing this topic.
DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #60 on: November 06, 2015, 12:31:24 AM »

Tetra transform is almost same as Menger fold but weaker (reason why Menger prevails wink )
Logged

No sweat, guardian of wisdom!
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #61 on: November 07, 2015, 06:11:11 PM »

Luca-
  Should I use the CL register for loops if I save ECX somewhere, or should I use AL instead since ECX is used for z? 
  Would this code snippet (assuming I have to use AL, and use defined Option work?

Code:
MOV	AL, INTEGER PTR DS:[EDI-10]   // assuming it's the bottom (lowest?? in OPTIONS definition) user defined option, is INTEGER a class??? or is it QWORD still??
//  OR should I point towards QWORD, and EDI shifted a bit to point at Integer values???

L1:
<LOOP-BODY>
DEC AL
JNZ L1
Logged

DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #62 on: November 07, 2015, 07:33:08 PM »

Hmm no... never do that use AL or AH instead
Or use a temp like that:
Dec dword ptr:[ebp...]
Jg (begin of cycle)
Logged

No sweat, guardian of wisdom!
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #63 on: November 07, 2015, 09:28:59 PM »

  UPDATE  CUBE TYPE WAS WRONG.. WILL COMPLETE UPDATE LATER!!! SORRY FOR THE SHODDY WORK!!!


 Thanks!   Also... would the code that I posted work?  I guess I have to try.  cheesy


  Here Luca..   I put pixel multipliers in these, so that we don't have to use an additional formula to remove pixel components.

  The Square Type does what it says in the description: T1, unSpheric (sphere to cube), Pine Tree, Spheric so you don't have to use a bunch of formula tabs.  Use it alternating with the other formulas for cool stuff.

  If you do a few T1s first, square type, a couple of Pine Tree 1, loop it....   it really squares it up.  

  So you can take out the "no yz" versions of Pine1, Pine2, and PineX and PineXYZ.  

* BenesiT2withPine.m3f (1.65 KB - downloaded 61 times.)
* BenesiT1withPine.m3f (8.22 KB - downloaded 59 times.)
* BenesiPine.m3f (10.02 KB - downloaded 56 times.)
« Last Edit: November 17, 2015, 02:22:06 AM by M Benesi » Logged

M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #64 on: November 08, 2015, 12:00:57 AM »

Also, worked on mag vs. xyz, which can be used as a transform with Pine Tree.  It's the fast, algebraic version.  Slower than Transform 1 (lots more math!!), not as smooth, but... it's slightly interesting by itself.  Might as well have it around:


* BenesiMagVsXYZ_Transform_Also.m3f (2.13 KB - downloaded 138 times.)
Logged

M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #65 on: November 13, 2015, 04:55:29 AM »

I added an option to the T1 with Pine Tree, so that you could do multiple T1s in one formula.  It allows you to do some of the things I've been doing recently.  


  Next project is to work on the polygonator and non-polygonator- extend the spheric functions to allow a little bit more stuff.  Still have not figured out the correct regular Tetrahedron- I might have done it.. but I can't tell.

  I'm probably going to have to ask Knighty for help, after I clean up the code a bit.  It might sound silly, but I really want to combine a Sierpinski tetrahedron with a Menger cube... so need cube to sphere (we have that), sphere to tetra (we have that, but the tetrahedron is not regular!!!), tetra to sphere (I think I can do that), then sphere to cube.  


  Also, made a 4d hyperspheric, 4d unhyperspheric, although I think the math is incorrect so will hold off on posting til I check them- might be my assembly, maybe I did the incorrect order of operations, or maybe it just doesn't really work that well.

  4d Transform 1 is also included (it works), with an optional version that preserves the original magnitude of x,y, and z, while still altering details a bit.  I don't think either does a lot, but it makes the extension of Tn (T1,T2,T3...) to higher dimensions a little easier to understand, since they all use magic angle rotations.  It does change the fractals a bit, and maybe mixing it with other 4d fractals will be interesting.  

 @Luca-  I'm not sure if I did the division correctly at the end of the 4d T1 with xyz clamp.  I saved the original magnitude in EBP-20, then need to divide the stack st(0) by it at the end, so do I use DC75E0 or DC7DE0?

  I would think DC7D, but I don't know if the reference (Art of Assembly) I'm using is correct (or if my interpretation of it is!), because I had to reverse a whole bunch of divisions in another formula to make it work.... I can't tell by looking at the fractal.

  Don't know how to run the script in Ollydebug to check the math, which would make it so much easier, if you have any tips for me.  Thanks for all you've done so far. 

4dT1:

3dT1:

* BenesiT1withPine.m3f (7.9 KB - downloaded 59 times.)
* BenesiTransform14D.m3f (13.19 KB - downloaded 45 times.)
* BenesiTranform14DXYZclamp.m3f (8.17 KB - downloaded 55 times.)
« Last Edit: November 13, 2015, 05:14:37 AM by M Benesi » Logged

M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #66 on: November 13, 2015, 07:17:39 AM »

That clamped version was wrong... I think.  Here are comparison shots between the exact same fractal with the various transform 1s.

Click to enlarge so you can see the differences a bit better.
4d t1 clamp xyz5 (not the above formula!) on left,  normal 4d T1 on right:



4d clamp The above formula!!! on left, 3d T1 version on right:




  3d fixed.  Don't know what I did.  Binary search?  Raystep?  It had more details, and was grainy looking.  Still have the image- just, it's not a good comparison for these ones.  
« Last Edit: November 13, 2015, 08:10:53 AM by M Benesi » Logged

DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #67 on: November 13, 2015, 01:16:11 PM »

You can not execute a full script in olly but you can test something manually modifying the floating stack then executing the code (saving - fstp -not always works! Except if you are able to modify EBX EDX ECX to some writeable memory... argh)
You then highlight where you want to run then run line by line... watch what happens. smiley
Logged

No sweat, guardian of wisdom!
M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #68 on: November 13, 2015, 07:06:44 PM »

  That doesn't help- if I knew how to run code in ODB, I wouldn't be asking how to run code in ODB.  If I can't run a script, I can't run code.  wink

  When I try to run code, it runs from the beginning of the file, not from the section I highlight.... 

  lol. Found it- have to set new origin from right click menu.  Still, can't write to EAX in twunk32, because it is system... trying hello world exe... cheesy
  
« Last Edit: November 13, 2015, 08:34:41 PM by M Benesi » Logged

M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #69 on: November 15, 2015, 11:58:58 PM »

  Has rotation at specific iterations in the right place in the formula, so you don't have to do T1, rotation, pine tree (3 formula tabs).

  Going to make one with the squaring thing on specific iterations too.  I'll try how to do it every 2 iterations or something like that....

  Still have the polyhedron transforms to add to this!  Lots of work. 


  <a href="https://www.youtube.com/v/ypxR2sQAnws&rel=1&fs=1&hd=1" target="_blank">https://www.youtube.com/v/ypxR2sQAnws&rel=1&fs=1&hd=1</a>

* BenesiT1_RotateYZ_Pine.m3f (10.57 KB - downloaded 136 times.)
Logged

M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #70 on: November 16, 2015, 08:08:50 AM »

UPDATE:  The formula... is not correct.  lol... The cube part should not have the sphere after the pine iteration.

  Will be updated later.  Took out formula...  sorry!!

K.  Added the square to it as well.  Tomorrow I will make it so that it will "square" every 3 iterations, unless something else comes up...  After that, time to work on the polgonator and polyhedronators for this fractal, so you can play with other shapes...


  Still want a general formula for the Platonics!@#!@$  cheesy

« Last Edit: November 17, 2015, 02:19:10 AM by M Benesi » Logged

M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #71 on: November 17, 2015, 04:37:25 AM »

Ok.  I put the spheric, after the Pine, after the cube, after the 1, probably because I swallowed a fly.  And I don't know why I swallowed a fly.  Perhaps I'll die.

  Anyway.  Here is a rotatin'pineCube and a rotatin'pineSquare fer yins.

  Square just squares it up.  Pretty sharp.  The cube one, well, it sort of stretches it out a bit.  Kind of nice too.  I'm liking the square though.  Going to make polygonal and polyhedral formulas for it, and add them, without the regular tetrahedral transform (just the general one I did for the Menger).  

  Then maybe make a square every iter??  // scratch that.. not too pretty.  Maybe set it up so that it does it every few iterations?  Or just have a formula that always does squares and mix that with formulas that don't.  cheesy

Square:
 
  
Cube:

  

* BenesiT1yzRotatinPineSquare.m3f (20.53 KB - downloaded 57 times.)
* BenesiT1yzRotatinPineCube.m3f (23.2 KB - downloaded 50 times.)
« Last Edit: November 17, 2015, 04:55:47 AM by M Benesi » Logged

M Benesi
Fractal Schemer
****
Posts: 1075



WWW
« Reply #72 on: November 17, 2015, 09:27:57 AM »

K.  It was hard to learn the floating point while loop in assembly, since there wasn't any good example to look at, and.. well.. ok, I was comparing the wrong way.. and to the wrong thing.  Took me hours to see the one little tiny thing, because, well, I thought I was implementing the loop the wrong way, because I couldn't find a good code example.

  So I assumed I had to find a good code example, and all along, it was more or less correct, with one wrong variable pointer. 

 Anyway, so only got the polygonal thing out today.  Going to combine it with other formulas for streamlining, but for now.  Enjoy.  If you do that kind of thing with interesting mathematical functions.   

  Use the Poly formula before pine tree, after Transform 1.  It might explode if you set it wrong!  Here is one with triangles and squares.  Click to enlarge.

* _BenesiPoly.m3f (0.68 KB - downloaded 40 times.)
Logged

lycium
Fractal Supremo
*****
Posts: 1158



WWW
« Reply #73 on: November 17, 2015, 04:32:43 PM »

Random programmer comment/observation: if you'd like to "future proof" these formulae, or simply make them usable in other systems, there should also be a plain C (or Pascal, or whatever) version besides the assembly code. I think x87 code written in 2015 (!!!!!) has way too high chance of being "lost in the sands of time", and this seems like a good effort so it would be a shame.
Logged

DarkBeam
Global Moderator
Fractal Senior
******
Posts: 2512


Fragments of the fractal -like the tip of it


« Reply #74 on: November 17, 2015, 04:50:53 PM »

Question...
What does BenesiPoly do?
Is it the same of polyfolding? I hope no... wink
Logged

No sweat, guardian of wisdom!
Pages: 1 ... 3 4 [5] 6 7   Go Down
  Print  
 
Jump to:  

Related Topics
Subject Started by Replies Views Last post
has anybody tried using ifs formulas with the mandelbuld/mandelbox formulas? 3D Fractal Generation cKleinhuis 4 4068 Last post May 05, 2010, 03:17:07 PM
by Power 8
Using formulas Mandelbulb 3d « 1 2 3 » Martial 43 3327 Last post February 09, 2012, 02:04:00 PM
by Jesse
Formulas Mandelbulb 3d Fractacular 10 1633 Last post April 06, 2012, 03:20:52 PM
by Alef
Maybe a few formulas Mandelbulb 3d Alef 1 1141 Last post February 16, 2013, 07:41:28 PM
by ericr
Formulas Mandelbulb 3d mary032964 2 817 Last post August 30, 2013, 08:44:17 PM
by mary032964

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines

Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.192 seconds with 25 queries. (Pretty URLs adds 0.019s, 2q)