Blender Analytical Geometry -*NEW*BAG 0.0.5

Announcing

Blender Analytical Geometry - BAG 0.0.1

With this script you can write in any curve as parametric
(x(u),y(u),z(u)) function or any surface as (x(u,v),y(u,v),z(u,v))
and draw it!

It is not limited to cartesian coords

Here is script -> http://www.selleri.org/Blender/scripts/BAG-0.0.1.zip

Here is demo image (with formula) -> http://www.selleri.org/Blender/buffer/bag1.png

WARNINGS

No syntax checking (yet) if formula is wrong script crashes

No save/load functions (yet) this will be fixed in next release, which will also hold some demo functions.

Comments?

Stefano

It looks very interesting, even so i’m not very good at math!
I saw something like this at http://jmsoler.free.fr/didacticiel/blender/tutor/index.htm, in the script part.

Again, very interesting! :smiley:

Not the same thing. The script you saw at this address:
http://jmsoler.free.fr/didacticiel/blender/tutor/cpl_surfaceimplicite.htm
is for “implicit” equations only not for for parametric ones and there is no GUI.

Where can one get a few formulas to feed into the script?

for implicit surface :

YAY!

Version 0.0.2 ready!

http://www.selleri.org/Blender

script section

Load and save… does not crash on errors, demo files, user defined constants, documentation…

Stefano

That looks great. I currently try to learn some Math-Stuff. It’s funny to play around with it an see what’s coming out.
Thank’s for sharing.
Doc

Thanx for positive replies :slight_smile:

Vers. 0.0.3 will include:

  • Some pre-defined constants (pi at least)
  • Possibility to use Constants in UV limits (Umin,Umax, etc.)
  • Better layoutting of constants, to allow for more than 7 (now they
    display on the GENERATE button :slight_smile:

More demos!

Stefano

Mmmm I should also add a Constants description in the XML file :slight_smile:

Stefano

0.0.3 !

http://www.selleri.org/Blender/scripts/bag-0.0.3.zip

All of the above done!

I’ve also been topd that AnaliticAL Geometry is correct english %|

Stefano

Trying to do this

https://blenderartists.org/forum/viewtopic.php?p=233418#233418

I saw that the possibility do define ‘macro expression’ is needed

Furthermore the User defined ‘Constants’ are the key point in the script so I probably split GUI in two tabs, the first holding only constants, the second the true expressions and the macros

Comments?

Stefano

YAY!

0.0.4

I won’t develop this any further for a while :slight_smile:

Much better now!

Macros, User defined labels, no need at all to edit XML files…

http://www.selleri.org/Blender/scripts/text.html

Stefano

:smiley: YAY! You’re a star.

%<

Really nice work, bravo!

( I always have a problem with the load/save buttons
hidden by the top of the scripts window. )

S68:

As you usual, you are an awsome (and superior) contributor. I have to first download the latest blender and give a try to your script (to be productive, I will have to go back to my long forgotten maths too :wink: ).

Thanks for your work.

Arnaud

PS: I don’t remember when I last visited the elysiun, but I can’t believe Blender has evolved so much in a bit less than a year… Maybe I will find some time this summer…

great script! Something like it should come integrated with blender, I think.

http://www.uncg.edu/~zpmorgan/curvething.jpg

(it was just a tube thing before I used alt-s and smooth here)

after and before alt+s:
http://www.uncg.edu/~zpmorgan/curvething2.jpg

EDIT: the inside of a torus with a fisheye lens:

http://www.uncg.edu/~zpmorgan/curvetorus.jpg

BAG is a nice idea. I don’t need to write import scripts for MAPLE now…

I might use it to teach my student’s about Morse functions on surfaces.

NB: analytical geometry is correct english spelling
analitical is not.

But

Parametric surface tool would be a more correct mathematical term :o

You should (I did) add uv coordinates to your script.

http://picard.ups-tlse.fr/~mcshane/torus.htm

Q: isn’t pi imported from the math module in Python?

A: yes it is

rho=9+sin(vpi2)+cos((u+n)20pi)
phi=u2pi
z=cos(vpi2)+sin((u+n)20pi)

n=0, .5

http://www.uncg.edu/~zpmorgan/curvething3.jpg

Why don’t you post the bag file ?

:slight_smile:

alright here it is:

the spiral torus bag

http://mark62756.home.comast.net/spiraltorus.bag

(thanks to mark62756 for hosting in these dire times)

well, if that doesn’t work,

&lt;BAG version="0.0.4"&gt;
&lt;Reference&gt;Cylindrical&lt;/Reference&gt;
&lt;Label&gt;
spiral torus
&lt;/Label&gt;
&lt;F1&gt;
tr+sin(v*pi*2)*tt+cos((u+off)*ln*2*pi)*lr
&lt;/F1&gt;
&lt;F2&gt;
u*2*pi
&lt;/F2&gt;
&lt;F3&gt;
cos(v*pi*2)*tt+sin((u+off)*ln*2*pi)*lr
&lt;/F3&gt;
&lt;ParU Min="0.0" Max="1.0"&gt;
70
&lt;/ParU&gt;
&lt;ParV Min="0.0" Max="1.0"&gt;
70
&lt;/ParV&gt;
&lt;UserPara Name="tr" Value="10.0" Index="0"&gt;
torus radius
&lt;/UserPara&gt;
&lt;UserPara Name="ln" Value="10.0" Index="1"&gt;
# of loops
&lt;/UserPara&gt;
&lt;UserPara Name="lr" Value="1.0" Index="2"&gt;
loop radius
&lt;/UserPara&gt;
&lt;UserPara Name="tt" Value="1.0" Index="3"&gt;
torus thickness
&lt;/UserPara&gt;
&lt;UserPara Name="off" Value="0.0" Index="4"&gt;
loop cycle offset(0-1)
&lt;/UserPara&gt;
&lt;Macro Name="E" Value="exp(alpha0*2*pi*v)" Index="0"&gt;
Exponential behavior
&lt;/Macro&gt;
&lt;/BAG&gt;

remember to remove doubles after generating the thing.