Circular Helix Array
 1-13  14-33  34-53  54-68

Previous
Next
 From:  Ed
1519.34 
re: Math functions

I have a project at the moment where I need to draw a sine wave. I was going to plot a sine wave in an Excel spreadsheet graph, then trace over in MoI.

I'd like to see an example of how to program one in MoI.

Ed
  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:  Brian (BWTR)
1519.35 In reply to 1519.34 
Is it not simple to bring in a jpeg image, even a jpeg of a "print screen", into the MoI View/Image to use to trace over?

The attached shows some sine wave images that could be saved for that purpose.
(Sorry if I have misinterpreted your question)
Brian

EDITED: 30 Dec 2008 by BWTR

  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
1519.36 In reply to 1519.32 
Hi Pilou,

Yup, you've got the right idea there - you would keep the top stuff the same, and edit the stuff that is inside of the <moi:PushButton> tags - each of those is one of those big buttons.

For each command, you would add the command name inside the command="" part, so for example for the Pipe plugin, you would put:

<moi:PushButton command="pipe">
....


Now pushing that particular big button will call the Pipe plugin command.

For changing the images or text, you can find the <img> tags, and change the src="" paramter to point to your own bitmap file - this can be a file on your local hard drive instead of on the web if you want, for those use the file:// address, like <img src="file://C:/images/MyImage.jpg">

To edit the text, find the areas inside the <td> tags that currently say stuff like "Some other command" and "Notes: Some notes here", and change those to say whatever you would like to have as text instead.

You can use copy and paste to insert new <moi:PushButton> elements as you wish.

If you look at the file you will see that there is a <tr> </tr> for each row of buttons (tr stands for table row), and then a <td> </td> around each button (td stands for table data cell) - if you are familiar with HTML this is all the same as that.

I found that I made a kind of error in the previous one - I had copy/pasted 3 tables in there instead of putting things all in one single bit outer table, I have attached an updated version (PluginGallery_fixed.zip) that has just one big outside table.

Of course there are also a lot of other possible ways to arrange this, I have attached an alternate version (PluginGallery2.zip) that is more like a single column vertical list. One thing that is nice about this arrangement is it is easier to add items to the end of it since you don't have to worry about any <table> <tr> or <td> stuff in it.


Note that after you edit these file you need to exit and restart MoI to see your changes applied (this is because MoI internally caches these files in memory to speed up subsequent loading, so it once it caches one version of a file it won't see any changes to the file during the same run).

- 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:  Brian (BWTR)
1519.37 In reply to 1519.35 
Just a very quick rough example.

EDITED: 30 Dec 2008 by BWTR

  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
1519.38 In reply to 1519.34 
Hi Ed - re: sine wave function

Here you go!

To install it, unzip the attached SineWave.zip file and copy the 2 files into the \commands subfolder under MoI's main installation folder, then you need to set up a shortcut key with the command name of SineWave and push that key to trigger the new command.



Everything in this one follows the same process as that previous toroidal helix command.


Note - the resulting curve only has its control points located exactly on the sine wave, the actual curve will follow the control points but not go exactly through them so there is some small deviation from this and a completely accurate sine wave, but it is pretty close.

You can use a higher point count if you want to increase the accuracy, as more points are used, the curve will be closer to the points and become more and more precise to the true sine wave shape.

Hope this helps!

- Michael

(EDIT: original version had a small bug where editing the length did not update, attaching updated fixed version).

EDITED: 5 Apr 2008 by MICHAEL GIBSON


  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:  jbshorty
1519.39 
Just blend between two lines to create 1/2 of the wave. Then mirror, join , and use Array Dir to repeat it...

jonah
Image Attachments:
Size: 62.1 KB, Downloaded: 106 times, Dimensions: 695x399px
  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:  Ed
1519.40 In reply to 1519.38 
Thanks for the Sine Wave Michael!

I like these little "wizards" you keep coming up with.

I was prepared to trace one, but having one accurately created will help with my model (which I hope to post soon).

Ed
  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
1519.41 In reply to 1519.39 
Hi Jonah,

> Just blend between two lines to create 1/2 of the wave.
> Then mirror, join , and use Array Dir to repeat it...

That's definitely a very similar shape, but that is slightly more bulgy/rounded than an actual sine wave...

- 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:  Brian (BWTR)
1519.42 In reply to 1519.41 
Michael--Plugin Gallery?

I don't seem to be getting anything to work?
Any chance of a fresh post using the "Best" zip and spelling out the proceedures again please?
Brian
  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:  manz
1519.43 In reply to 1519.42 
Hi Brian,
Plugin Gallery,

After you have placed the PluginGallery.htlm into the MoI\ui directory, you will then want to make some images for the tool/plugin you are going to show, then place those images into a directory (probably best into a sub directory of MoI)

Then open the PluginGallery.htlm file in notepad(or similar), if you look down the file you will see:-



Shaded in red is the name of the actual command. In blue is the location of the image (this will be on your own HD in the directory you have placed your images). In green is a description of what the plugin/tool does.

After the bottom red line, you will see in the PluginGallery.html that the above info is repeated, so just change the command name/ image location and description for the command you want to show in the gallery.

Then add your shortcut key

Hope that helps,

- Steve

EDITED: 3 Aug 2009 by MANZ

  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:  Brian (BWTR)
1519.44 In reply to 1519.43 
Thanks Michael---far to difficult for my old brain.
And that seems to have gone even further steps ahead of what I was trying to grasp from the original and changed, first zips/imformation?
  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
1519.45 In reply to 1519.44 
Hi Brian, here is a step-by-step:

1 - download the PluginGallery.zip file that is attached to this post.

2 - Unzip this to get the PluginGallery.htm file.

3 - Copy PluginGallery.htm to the C:\Program Files\MoI 1.0\ui folder on your hard drive. (note - this is the \ui folder in this case, not the \commands folder which other plug-in commands are usually copied to).

4 - Go to Options / Shortcut keys, and add in a new entry, use this for the command:
code:
script:moi.ui.createDialog( 'moi://ui/PluginGallery.htm', 'resizeable' );

Now when you press the key you assigned the shortcut key to, that plugin gallery page will come up in a dialog box, this will be the thing that Pilou showed a screenshot of above.

It is not particularly exciting right now, it is more of a template that could be filled in if you wanted to include a special plugin view with graphics and lots of descriptive text.

Right now there are 9 big buttons on it, the one in the upper-left will fire off that "ToroidalHelix" command if you push it. The other ones are just placeholders that could be edited if you wanted to fill in other plugins here.


It's not really a very big deal, but if you really really want an illustrated and annotated plugin guide, then this could do that right now...

The text-menu thing that I am planning on adding in for v2 will be a lot more automatic than this and won't require any kind of manual editing to make things show up - this editable one is if you want a fancier screen than that.

- 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:  Brian (BWTR)
1519.46 In reply to 1519.45 
Thanks 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:  Michael Gibson
1519.47 In reply to 1519.46 
Hi Brian, no problem.

But I just had a good idea on how to improve it.

I've attached here what I think is the best one (PluginGallery3.zip) - follow the same instructions as above to install it, except for the shortcut key command use this instead:
code:
script:moi.ui.createDialog( 'moi://ui/PluginGallery3.htm', 'resizeable,defaultWidth:1000,defaultHeight:1000' );

That should also cause the dialog to be opened to a larger size by default.

This version (PluginGallery3.htm) is a thumbnail type view to have more things on the screen at once, but still maintains an easier to edit structure without needing to put in <tr> or <td> (table rows or table cells) type things in it, you can add in a new button more easily on this one by just copy/pasting the last button entry in the list.

Also this one is more adaptive than the previous thumbnail one, it fits as many as will display on the screen at once instead of a fixed number across.


So if you really wanted to build a plugin gallery, this one should be the best one to base it on.

- 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:  Brian (BWTR)
1519.48 In reply to 1519.47 
Thanks. Installed.
But, for adding stuff, I gather you are refering to the 1519.43 post.
  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)
1519.49 In reply to 1519.47 
Your last work fine also :)

And now very more easy to add something for no limit to the bottom !) (previous also but more complicated :)
And necessary
As I see sinus & cos arrive :)

For an elaborated page
It will just a little difficult for a noob in Html to attribute a new own image from their computer

In any case that is very convenient!

A detail : it's not possible to have the automatic close window after the launch of the plugin?
---
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
1519.50 In reply to 1519.48 
Hi Brian,

> But, for adding stuff, I gather you are refering to the 1519.43 post.

Yeah, to add stuff means to edit that file in a text editor program like notepad, like Steve was showing in that post.

- 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:  Michael Gibson
1519.51 In reply to 1519.49 
Hi Pilou,

> And necessary
> As I see sinus & cos arrive :)

Hmmm, but sine curve is a pretty good example of something that would work very well on a text menu and doesn't really need a big image or a lot of additional text along with it.

But yes there is not even a text menu currently so if you do want to have an organized plug-in UI for v1 then this method would do it for you right now...


> It will just a little difficult for a noob in Html to attribute a new own
> image from their computer

Yeah, although if you are using an image on your own computer that is already sized, you can then leave out the width and height and you only need to put:
<img src="file://c:/your_image_file.jpg">


> A detail : it's not possible to have the automatic close window
> after the launch of the plugin?

Yup, no problem - try this attached updated version.

- 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)
1519.52 In reply to 1519.51 
Now that is more cool cool :)
Close window works fine!
And that is cool that window can be rezised over the screen!
Here I recall the "gallery of Plugin" after use one time the function ;)

With this system, normal shortcut are no more necessary if wanted?
just for the more used or practical and this of the gallery of course! :)


EDITED: 6 Apr 2008 by PILOU

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:  Michael Gibson
1519.53 In reply to 1519.52 
Hi Pilou,

> With this system, normal shortcut are no more necessary if wanted?

Yup, that's correct - if you make a button in the gallery for a plug-in, it is no longer necessary to fill in a keyboard shortcut for that plug-in as well, those are totally separate things.

- 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
 

Reply to All Reply to All

 

 
Show messages:  1-13  14-33  34-53  54-68