[script] FxGraph - 2D/3D Function plotter
 1-14  15-34  35-54  55-74  75-91

Previous
Next
 From:  bemfarmer
6447.35 In reply to 6447.34 
Hi Mike,
Network does not always work on such complete structures, but may work with portions.
(Having a lot more U and V curves may prevent Network from working.)

After creating the UV curves,
1. Place a point at the origin. This is not essential, but helps locating the origin.
2. Select only the curves passing through the origin.
These are the U curves, and could have been identified by previously running a separate U mode. (It is not essential to run a separate U mode.)
3. Run Trim command
4. Press "add trim points"
5. Select origin point as place to put the added trim point.
6. Press Done. (Do not press "remove curves" button.)
7. Press Done again. The two "lobes" are now separate.
8. Select both U and V curves for one entire lobe.
9. Press Network, which creates one lobe surface in half a second or so.
(Network does not work if both lobes UV lines are selected at the same time.)
10. The second lobe can also be Networked separately.

- Brian

EDITED: 24 Jul 2017 by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  BurrMan
6447.36 
Hi Michael,
With regard to these last "FXGraph" scripts posted here:

http://moi3d.com/forum/index.php?webtag=MOI&msg=6447.31

They work from entering the command in the command area. Is there a modification to it to call from a js file like a regular script? Or is a complete rewrite?
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
6447.37 In reply to 6447.36 
Hi Burr,

re:
> They work from entering the command in the command area. Is there a modification to it
> to call from a js file like a regular script? Or is a complete rewrite?

That's just one option that it can be run from the command area - the way Brian shows above runs the _FxGraph3D command but also gives it command line parameters. I think the _FxGraph3D command can also be run without any command line parameters too, that's just one way for it to initialize its UI.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Mike (MGG942)
6447.38 In reply to 6447.35 
Many thanks, Brian.

The bit that tripped me up (I am now embarrassed to admit) was to attempt to Network both halves in one operation.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  BurrMan
6447.39 In reply to 6447.37 
Hi Michael,
""""""""""" the way Brian shows above runs the _FxGraph3D command but also gives it command line parameters."""""""""""""""""

Yes. But can that work from a js file? Like is it just missing a "command execute" or something? How to make those parameters pass from the js file? (Without a big rewrite.)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
6447.40 In reply to 6447.39 
Hi Burr, from what other .js file, do you have something like a launcher dialog you're setting up? You should be able to use moi.command.execCommand(); to do the same thing, it should support command line parameters just make sure there is a space between the command name and the parameters in the string you send to moi.command.execCommand() same as in the pasted in text.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  BurrMan
6447.41 In reply to 6447.40 
Hi michael,
No, i have no file i was working on. I just put the scripts from the forum in js files as opposed to shortcuts. This particular "command" didnt work from a js file.

Can you give me a quick example of using the moi.command.execCommand()?

I was looking to just put these last fxgraph (with parameters) scripts into named js files so i can call them that way.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
6447.42 In reply to 6447.41 
Hi Burr, sure - so the first one that Brian had here: http://moi3d.com/forum/index.php?webtag=MOI&msg=6447.31 (the one labeled sinhLeaf) would be like this:

code:
moi.command.execCommand( '_FxGraph3D u;v;((exp(u) - exp((-1)*u))/2 + (exp(v) - exp((-1)*v))/2);-3.14159;3.14159;-3.14159;3.14159;15;15;0;0;0;UV' );

Does that do what you need? If not can you post your .js file and tell me how it's launched so I can better understand what you're trying to do.

- Michael
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  BurrMan
6447.43 In reply to 6447.42 
Well, i dont know if it can be any simpler!!! Lol :)

Just put that command argument in the brackets of the moi.commamd.execCommand()..

(Edit) and end it with a semi colon. (Edit)

Thank you kind sir.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
6447.44 
Any image of what the formula above do ? :)
---
Pilou
Is beautiful that please without concept!
My Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
6447.45 In reply to 6447.44 
@Burr - you're welcome!

@Pilou, that particular one makes this:



- Michael
Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
6447.46 In reply to 6447.45 
Thx! :)
---
Pilou
Is beautiful that please without concept!
My Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
6447.47 In reply to 6447.42 
Thank you Michael. (I was trying to do some .js with #include _FXGraph3d...)

To implement Michael's code shown in post above, what I did was to create a file called _LeafSinh.js, in notepad++, and copy Michael's code to said file.
Then the _LeafSinh.js file was copied to the MoI3Command folder.
Now the "Leaf" FXGraph3D script can be selected, in MoI, from Ext.Scripts, Max's custom UI.

I think that I recall Burr setting up separate External Scripts files, so I plan to make one for just FXGraph3D scripts (?)
I'll have to look up how to do that...

- Brian

EDITED: 26 Jul 2017 by BEMFARMER

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  BurrMan
6447.48 In reply to 6447.47 
Hi bem,
Well, in these earlier versions of MoI you can just make a folder named "scripts" in the installation root. The command field in MoI reads that folder too.

But things in that folder are for "inline scripts" and they run seperately than commands.

For max's customui, i added a page and directed it to that folder.

I think michael has been discussing that he is looking at changing that seperation.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  BurrMan
6447.49 In reply to 6447.42 
Worked like a charm! As far as me spelling it out, I left out another part.

"Putting the command. with line parameters into the brackets (), the command is also surrounded by 's. So ('command')

Anyway.....
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Mike (MGG942)
6447.50 
It's fascinating how mathematical formulas can result in interesting shapes.
Here's one that I found on MathMod: Stereosphere

Copy (Ctr-c) the following and then within Moi hit Tab and paste (Ctr-v)

_FxGraph3D 2.*u/(u*u+v*v+1.);2.*v/(u*u+v*v+1.);(u*u+v*v-1.)/(u*u+v*v+1.);-2;2;-2;2;15;15;1;1;1;UV

Or copy the following to the Commands folder and it will show up as Stereosphere in Max's UI ext scripts feature.

moi.command.execCommand( '_FxGraph3D 2.*u/(u*u+v*v+1.);2.*v/(u*u+v*v+1.);(u*u+v*v-1.)/(u*u+v*v+1.);-2;2;-2;2;15;15;1;1;1;UV' );

Note. If you have done what I apparently have foolishly done and omitted the leading underscore of _FxGraph3D in your set up then you will need to omit it from the preceding lines.

The resultant mesh will Network as it is.

It is quite small, so, to make a solid I first scaled up by a factor of 30, and then used Construct/Offset/Shell with a value of 2mm and Direction Normal.

Just in case you're wondering the formula does NOT produce the lettering shown in the attachment!
Image Attachments:
Size: 114.2 KB, Downloaded: 47 times, Dimensions: 637x508px
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
6447.51 In reply to 6447.50 
Amazing indeed!
---
Pilou
Is beautiful that please without concept!
My Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  speedy (AL2000)
6447.52 In reply to 6447.50 
Hi Mike
look this
Stereo Sphere-
link :https://www.mediafire.com/?xni7d1ima5h4aio
in Elephant Stereo Sphere Parametrized
best
al
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Mike (MGG942)
6447.53 In reply to 6447.52 
Thanks, Al.

I've not yet taken the plunge into node editor but you've given me another reason to do so.

Mike.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Mike (MGG942)
6447.54 
A way to make a solid version a 'Trumpet'.
The method is based on Max's marvellous _FXGraph3D and uses parametric equations from the equally marvellous MathMod.
Copy (Ctr-c) the following and then within Moi hit Tab and paste (Ctr-v)
_FxGraph3D cos(u)*sin(v); sin(u)*sin(v); cos(v)+log(tan(1/2*v));0;6.283;0.03;1.5;50;50;1;1;1;UV

Note. If you have done what I apparently have foolishly done and omitted the leading underscore of _FxGraph3D in your set up then you will need to omit it from the preceding line.

In (bottom right of) the _FxGraph3D dialog change Mode from UV to U then click on done.
Now select all the curves and execute Construct/Loft using Loft Style: Normal and Profiles: Auto
Delete (or hide) the curves. This should give you 'Trumpet' shaped surface with a slice out of it.
Select the surface and execute Construct/Offset/Shell using Thickness: 0.02mm and Direction: Centerline.
This should result in a solid.
Select the 8 edges that form the gap in the Trumpet, then copy (Ctrl-c) and paste (Ctrl-v) them and execute Edit/Join.
Then execute Construct/Loft using Loft Style: Normal and Profiles: Auto.
This should result in a solid filling the gap.
Select both solids and Boolean Union them together.
Here's the result:




Attachments:

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
Show messages:  1-14  15-34  35-54  55-74  75-91