Creating "network" Clouds for Diagrams

Share your Inkscape tricks and tutorials here.
bot779
Posts: 9
Joined: Sat Dec 19, 2015 9:21 am

Creating "network" Clouds for Diagrams

Postby bot779 » Sat Dec 19, 2015 10:12 am

I've discovered a way to use Dynamic Offsets of Star shapes to make simple Cloud shapes for use in Network diagrams.

Start by selecting the "Star" tool.
On the "new" menubar, enter "6" for the number of corners.

Click on the center-point, where you'd like to draw your cloud and drag out to the desired size of your cloud.

click on the "Edit" Menu, "XML Editor" entry.
(or hit Shift+Ctrl+X to bring it up)

set sodipodi:arg1 to 0
set sodipodi:arg2 to 0.288

set sodipodi:R2 to two thirds of sodipodi:R1

hit Ctrl+J to create a Dynamic Offset

set inkscape:radius to 125% of your sodipodi:R1 value.

If you don't like doing math:
Feel free to use the numbers from these examples:

If sodipodi:r1 is 60:
sodipodi:r2 should be set to 40 and
(after hitting ctrl+J)
inkscape:radius should be set to 75

If sodipodi:r1 is 30:
sodipodi:r2 should be set to 20 and
inkscape:radius should be set to 37

This should result in the "perfect" (if overly round) cloud lineart.
Widen your cloud to suit your taste by choosing the
"select" (pointer) tool and
dragging the left/right handles.

Your result should look like this:
Last edited by bot779 on Wed Jan 20, 2016 6:02 am, edited 1 time in total.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Creating "network" Clouds for Diagrams

Postby brynn » Sat Dec 19, 2015 11:34 am

Would you please tell us what sodipodi:arg1 and 2 do? And also what sodipodi:r1 and r2 do? I'm curious to know how this prepares the star, so that dynamic offset creates the shape you want.

I don't need a big technical explanation -- just a general idea.

I'm also curious if there's a way to do that without the XML Editor -- only using on-canvas controls? I can make a pretty good cloud using dynamic offset and envelope deform LPE. But then, I don't know what a network diagram or network cloud diagram is.

Also might bring more interest if you showed one of these star-generated clouds. Because I'll have to look up what are "network diagrams" or "network cloud diagrams", and some people might not bother looking it up. But if I see the object you're making, I might not need to look it up.

juda
Posts: 1
Joined: Mon Dec 21, 2015 1:59 am

Re: Creating "network" Clouds for Diagrams

Postby juda » Mon Dec 21, 2015 2:06 am

Hi
Am learning how to make 2d nimations, I was wondering if anyone can help me find where to get free Inkscape created characters to use to learn.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Creating "network" Clouds for Diagrams

Postby brynn » Mon Dec 21, 2015 3:57 am

To learn how to make animations, you don't need whole characters, made with Inkscape or with any program. You can start by learning how to move a simple square or circle across the screen. Or move a simple object around a circle, or rotate a star, etc.

Of course you realize that 2d animations require raster images, and that Inkscape is a vector editor. There is LOADS and LOADS of free clipart (usually raster images) around the internet -- just search.

Or you could even learn with a stick-man drawing.

Moini
Posts: 3381
Joined: Mon Oct 05, 2015 10:44 am

Re: Creating "network" Clouds for Diagrams

Postby Moini » Mon Dec 21, 2015 5:04 am

@brynn: small correction: 2d animations do not require raster images, vector images work just as well or sometimes even better.
2D just means it's flat, just like a rotating square would be (and not a rotating cube ;) )
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!

Inkscape FAQ - Learning Resources - Website with tutorials (German and English)

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Creating "network" Clouds for Diagrams

Postby brynn » Mon Dec 21, 2015 8:50 am

Oh right. You're right. I'm not sure what I was thinking.....mostly thinking why this was posted in this topic, which is nothing to do with animation, and why the member didn't just search the internet themselves, and....some other possibly obvious things. Well anyway, I wasn't focused on the question itself.

Sorry for the wrong information :oops:

bot779
Posts: 9
Joined: Sat Dec 19, 2015 9:21 am

Re: Creating "network" Clouds for Diagrams

Postby bot779 » Wed Jan 20, 2016 3:04 am

brynn:

A "network cloud" is a simple lineart cloud you'd use in (visio like) graphical network documentation, usually to represent "the internet".

You can create this network cloud shape without the XML editor.
(which I first did by accident)
But I found replicating the shape (freehand) to be extremely difficult.
Either I don't know how to use Inkscape's "numeric" on-screen controls properly, or they don't provide enough control to completely describe the shape.

re: the XML variables:
R1 is the outer radius of the star, while R2 is the "inner radius" of the inside corners of the star.
You can see these change if/when you grab a corner and move it closer/further to/from the center of the star.

sodipodi:arg1 and sodipodi:arg2 are the angle of the star's first outer corner and first inner corner, measured in radians from the center of the star.
You can see those values change if/when you grab a corner and move it around the center of the star.

inkscape:radius is the size of the "offset" from the original star shape.

I should have mentioned that Object/Fill_and_Stroke should be used to set the "fill" color to "X". (clear)
..though I guess you could choose whatever color you like, as long as it's different from the stroke color, which I would typically make black.

I would have posted a picture of the resulting cloud to this forum but I couldn't figure out how to do that.
(It was my firt time posting here)
If you can send me a link/description of how to do that, I'll give it a shot.

bot779
Posts: 9
Joined: Sat Dec 19, 2015 9:21 am

Re: Creating "network" Clouds for Diagrams

Postby bot779 » Wed Jan 20, 2016 6:10 am

brynn wrote:might bring more interest if you showed one of these star-generated clouds. ... if I see the object you're making, I might not need to look it up.


OK. I created an account on Deviant Art, posted the image and embedded a link to it in an edit to my original post.
I figured that might be the best way 'cause there's a special syntax for embedding Deviant Art content.

(referenced here:
viewtopic.php?f=14&t=7
)

..but it doesn't automatically display inline, you have to click-through some flash thing to see the image.
Let me know if there's a better way to embed images in a post.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Creating "network" Clouds for Diagrams

Postby brynn » Wed Jan 20, 2016 11:02 am

The DA embedder might be broken at the moment, I'm not sure. But the "Direct Link" link works. Or just a regular link should work too. Or use a regular link with the img tags.

Oh yeah, that's a really nice cloud! You could use it for other things too, besides diagrams.

I wasn't sure what you meant, because there are these things called tag clouds, that you see in blogs, that help with navigation, where the size of the word gives you a clue how many articles there are for that search word. And there's a similar kind of word cloud, which is an image made of many words arranged in various, creative ways.

So I didn't know if there was a symbol for "network" which you had arranged several into some kind of cloud image.....or if "network cloud" was a network in "the cloud" and maybe there was some special symbol for that.

bot779
Posts: 9
Joined: Sat Dec 19, 2015 9:21 am

Re: Creating "network" Clouds for Diagrams

Postby bot779 » Wed Jan 20, 2016 4:12 pm

I'm glad you like the cloud.
The embedded DA link seems to work intermittently. I'm not sure why.

I'm still trying to figure out how to use inkscape for better for diagramming.
It'd be nice to know how to link the endpoint of a line to the cloud (or boxes, etc) so that the lines swing to stay connected to objects that are moved.

I'd also like to know how to script/automate things like changing those XML variables.

If you know where I can find info on either of those things, please let me know.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Creating "network" Clouds for Diagrams

Postby brynn » Wed Jan 20, 2016 8:39 pm

I can think of a couple of solutions for moving the cloud and the line that connects it. One is the Connector tool, which I think may have been made as a solution exactly for that..... Yes, when I try it, the line doesn't move "live" when the cloud is moved. But as soon as I release the mouse, the line jumps into place.

Be sure and check the manual for info on how to use the Connector tool. It doesn't seem necessarily intuitive, to me.

Another way to do it, is just with a certain selection technique. Select the cloud and the line, then switch to the Node tool. Select all the nodes of the cloud and the 1 node of the line that touches the cloud. Then the selected node moves around with the cloud.

Here's info on all the different kinds of animation which Inkscape images can be used with: https://inkscape.org/en/learn/animation/. It's not exactly an exhaustive review, but provides a good overview.

bot779
Posts: 9
Joined: Sat Dec 19, 2015 9:21 am

Re: Creating "network" Clouds for Diagrams

Postby bot779 » Thu Jan 21, 2016 9:20 am

Brynn:

You're referring to the "create diagram connectors" tool?
Yes, that does what I want w/ lines (if I'm OK w/ having my lines stick to the center-point of an object) but I'd prefer to be able to do this w/ bezier curves and also to be able to bind to specific points on an object.

Here's my restatement of your selection technique:
I can shift-click to select both an object and line(s). (in F1 select mode)
In F2 (edit path) mode I can select all the nodes of a square (for example) and line enpoint(s), then click+drag any of the selected nodes in order to move all of them.

This doesn't work with a standard "box" drawn object but it does work if I draw a box w/ the bezier tool.
But I can use the "box" tool and use Path/Object_to_Path to convert it to a path and get that to work.

This method of selection is tedious if a lot of things need to be moved.
It'd be nice if I could somehow join these line-ends to the box and have the lines move w/ the box, the way "diagram connectors" do.
Using ctrl-K (combine) doesn't do the trick. That combines the entire line and not just the endpoint.

I can take the diagram connector and convert that to a path, but then it loses it's "diagram connector" properties.

re: your "animation" link:
I'm not trying to do animation but I do see scripting references in there that mention javascript.
If I could kickoff javascript from within inkscape, that'd be cool.
..but everything mentioned in that link seems to be about embedding javascript so that it would run in a browser.
Does that mean I can't use javascript to draw/script/automate within inkscape?

Here are some links I found to help w/ creating diagrams:
http://www.ioncannon.net/utilities/123/ ... -inkscape/
https://openclipart.org/

This seems to explain the extent-of-capabilities of diagram connectors:
http://goinkscape.com/create-beautiful- ... -inkscape/

This goes way beyond the original subject/post but:
Maybe if diagram connectors were implemented as a script/extension, it would be modifiable to do what I want.

This seems to be info on using external scripts as extensions:
http://wiki.inkscape.org/wiki/index.php ... extensions
http://wiki.inkscape.org/wiki/index.php ... tor_format

This seems to be a "very simple" python script for adding text to a drawing from within inkscape.
viewtopic.php?f=11&t=9212

..draw an unfolded cone via a python extension:
https://github.com/quirxi/SheetMetalCone/

..draw a calendar
http://wiki.colivre.net/Aurium/Inkscape ... hellScript

..snap all "box"/line objects to screen-pixel boundaries.
https://code.google.com/p/pixelsnap/

..closes selected paths. (the only extention that is aware of selected objects?)
http://www.cnc-club.ru/forum/viewtopic. ... &t=37&p=92

This seems to be a python extension that (in turn) invokes javascript code:
http://wiki.colivre.net/bin/view/Aurium ... Javascript

This seems to be a way to run standalone bash code to edit SVG/inkscape documents.
http://wiki.colivre.net/bin/view/Aurium ... Javascript

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Creating "network" Clouds for Diagrams

Postby brynn » Thu Jan 21, 2016 10:17 pm

Oh, I misunderstood when you said "automate". Or maybe I misread it. Anyway, sorry about that. I know little to nothing about using scripts to automate certain Inkscape features. I guess you need to already know certain scripting languages.

Oh! are you familiar with using Inkscape from the command line? Here's some info: http://tavmjong.free.fr/INKSCAPE/MANUAL ... dLine.html And maybe some more here: https://inkscape.org/en/doc/inkscape-man.html. I'm not sure if that's technically "scripting". But still, you can do things that way, that you can't do on the canvas.

There are LOADS of python extensions for Inkscape, and I think a handful of extensions in another language (I don't remember what it is, atm). I'm working on a project to have all the extensions contained in sort of a master list, and eventually will be on the Inkscape website, and eventually maybe even including downloads. But it's a long term project for me.

If you're looking to learn how to write extension, we have a brief tutorial. It needs to be fleshed out in places. But it's a start. https://inkscape.org/en/develop/extensions/

bot779
Posts: 9
Joined: Sat Dec 19, 2015 9:21 am

Inkscape Scripting

Postby bot779 » Fri Jan 22, 2016 3:39 am

When I initially searched for an inkscape "commandline", I didn't find the in-application interactive scripting environment I was hoping for but I did find references to inkscape commandline options.
When I looked into the commandline options, I was shocked by how many of them there were and how low-level they got w/ drawing commands, etc.

..but I'm running Inkscape on a windows machine and not on a linux machine.
Since I don't think of MS-Windows as having a decent scripting environment
(or because I don't have powershell experience?)
I didn't follow up on what could be done entirely via commandline options.

I'd rather not do something that depends on an "external" scripting environment that's not portable to other operating systems.
I'd like there to be better interactivity between the scripting commands and the Inkscape user interface than *I think* would be possible via invocation-ime commandline options.

What I want to do is be able to
1) Enter commands within inkscape to do anything that you could do w/ the GUI.
(maybe by entering those invocation-time commandline options into an internal commandline)
2) View what was done in the GUI as a series of commands.
(making it a semi self-documenting environment)
3) Run Predefined sets of commands that were previously saved in a file.

I understand that all this may not be possible, but that's the ideal. (possibly a fantasy)

It seems like the most inkscape-portable thing to do would be to learn/use Python.
Whatever I do in Python script-extensions should work on all OS platforms.

On the other hand, If I figure out how to write an inkscape extension using javascript, that could provide more code-commonality w/ web-based javascript/SVG applications.

So I'm still wondering what my ideal coding / inkscape_automation technique would be.
(for "today's" inkscape)

FYI:
I noticed something in one of your links about "internationalization" and that reminded me that I have another passing interest in creating a new font for a language for which there are currently no unicode graphemes.
(I.E. a language for which a unicode font has never been created)
Inkscape seems like a good tool for this but I'd really like to have draftsman-like sub-pixel accuracy which brings me back to wanting interactive scripting.

If only there was time to follow up on every interest...
..but these are perhaps topics for other threads.

bot779
Posts: 9
Joined: Sat Dec 19, 2015 9:21 am

Re: Creating "network" Clouds for Diagrams

Postby bot779 » Fri Jan 22, 2016 4:55 am

Hmm. the last subject used in a post seems to show up in links to this thread instead of the original name of the thread.
Switching back to the original subject name....

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Creating "network" Clouds for Diagrams

Postby brynn » Fri Jan 22, 2016 12:09 pm

Since scripting is outside my skill set, I can't really make any helpful comments. But good luck with your endeavors :D

Maybe Lazur could split this thread into 2 subjects, if you like? (He's the current moderator.) (I'm "retired".)


Return to “Tricks & Tutorials”