Dia : the diagram editor : limits on box objects? - uml

As in title , I try to develop as few schemes for hte 3d graphics enigne -- ogre3d ; problem is the big picture scheme the class Ogre::Root requires quite many arrows descending from it.
The model of joining boxes with relational arrows is they can only go in / out by specific points around the border ( called "joints" or something ) . Now, however I wouldn't try there are always 4 + 4 + 3 + 3 joints displaced at four sides , suppose I need to place seven arrows on one side, how do I do that ?
EDIT:
Here is what I mean, the "flies" or "crosses" to which one can bind the arrows are limited in number. I marked one of them with double circle ....
MyDiaScreenCaputre

TL;DR Don't fight Dia to draw complex UML models. It is not appropriate tool for this task
1) the points around the border in Dia are called connection points. According to the official Dia FAQ their number is fixed in the shape's definition (see https://wiki.gnome.org/Apps/Dia/Faq → Why do elements have a fixed number of connection points?). However, it is possible to edit the shape definition and add your own points, see http://sdteffen.blogspot.cz/2012/08/improved-dia-shape-export-draw-your.html for more
2) using software designed for just drawing pictures for documenting UML models is not very smart neither useful. First and foremost such tools create pictures and can not work with or exchange UML models with other tools (see Wikipedia: XML Metadata Interchange for description of *.xmi format)
3) in the category of free editors for just pictures capable of drawing some simple UML diagrams I'd recommend the multiplatform yWorks yEd Graph Editor. An exceptional feature of this tool is the ability to automatically layout large graphs using several configurable algorithms and the ability to create nested/collapsible graphs + the output looks cool and the tool is quite easy to work with
4) in the category of real UML tools I'd recommend the Sparx Systems Enterprise Architect as commercial tool for Windows and Modeliosoft's Modelio as multiplatform open source tool. However, recommending a tool is out of the scope of the Stack Overflow site (§4) so I won't give you a comprehensive answer neither you'll find such a recommendation in older Stack Overflow answers also because the market of online html5 tools changes quickly and new tools appear quite often

Related

glTF: how can we store basic geometry primitives?

I'm new to glTF and I would have a very basic, and maybe naive, question. Sorry, and thanks for your understanding and your help.
We have a C++ application where we handle geometry primitive entities, like boxes, cones, cylinders, and so forth.
For visualizing the geometry entities we currently use Coin3D, which have corresponding geometry shapes: Box, Cone, ...
We now would like to add a glTF exporter too, and I have started to explore the glTF specs.
I must say, in the official documentation, and on the web, I could not find any support in glTF for basic geometry shapes.
Therefore, my questions are:
is that true, that glTF has no notion of, let's say, a Box, or a Cone? Or did I missed something obvious?
If the answer to 1) is "NO", are there tested/supported/suggested implementations for basic shapes? I have only found some "example" shapes, like the Box here; but I could not find any collection of implementations of basic shapes. Again, did I miss something?
Are there any best practices, or documentation, on how to implement basic geometry shapes in glTF?
The short answer is you're correct, glTF does not currently store basic geometric shapes directly as a box, cone, cylinder, etc. The format is intended to be a runtime delivery format, not an asset interchange format.
As such, the internal data structures within glTF are designed to mimic the raw data that would typically be fed into a GPU using a graphics API such as OpenGL, WebGL, etc. Entire blocks of glTF data can often be pulled off a disk or network and handed over directly to a graphics API for rendering, with minimal pre-processing.
This means that all of your basic shapes must arrive as the GPU expects to find them: triangulated. Even a simple box is made up of twelve triangles, and because the sides don't share normal vectors, the normal "vertex attributes" are different, hence triangles from different sides of the box don't share vertices (again, because the GPU wouldn't accept that as a raw input). The benefit is that a WebGL client doesn't have to think very hard about what to do when it receives a glTF, it can just start cramming data into the graphics pipeline to get things moving.
For a broader overview, the ever-popular glTF - What the Duck diagram is widely considered an excellent starting point, and the glTF Tutorials are a good follow-up to that.

VTK alternatives

I apologize if the answer was already somewhere, searching the interwebs did not return me the answer(s) I was looking for.
Situation : I have a small graph (a set of Edges and Nodes that is) - Now I want to display it in an interactive manner, and I would like to manipulate the display styles and symbols that are used for edges and nodes, programetically.
Hence kgraphviewer wont work - i want to do it programetically as stated.
I noticed VTK, comes with a lot of built is graph drawing algorithms. But seems to be a really large one.
Question : What are some alternatives to VTK ? Graphviz is probably one, but I can not confirm that graphviz comes with all the graph drawing algorithms as VTK - any other possibly smaller options, with all the built in graphs?
Side note : Some systems uses a static drawign widget, i.e. once the drawing is displayed, in an widget that the system comes with, you can not interact with the drawing using your mouse. The GNU implementation of IDL, GDL, has this problem. I would Like to avoid this.
Yes, I agree with you regarding the VTK's consideration: it's a powerful toolkit but it is (maybe) too much "big", and it's not so easy to configure a working VTK environment.
I don't have a great experience in the field of graphs, but a search leads to this other StackOverflow post. I think that Prefuse, listed under the Java section, could be of some interest. C++ itself seems to have a lot of choices, listed in various answers, here. I hope that it will help.
I used Gephi public domain graph visualization software on Linux. It was a quick way to get a 3 D. Picture which can be modified with line thickness to show an edge weight - good for comm network work.

Programming a 3d game without the use of a graphics API

As the title says, I'd like to program a 3d game (probably a BattleZone clone), but without the use of an API like OpenGL, DirectX, and the like. At the heart of the matter, I'd just like to learn how to draw basic 3d shapes to the screen and manipulate them. Don't care if it looks like crap. I've used OpenGL to achieve similar ends before, but really didn't learn about these topics.
The problem is, I have no idea where to start. I downloaded the Doom source code, but it's a bit over my head. Although I've programmed a bit, graphical matters are very much out of my depth.
I'd be very grateful if anyone could offer links or code (in any language) that would help me along in my purpose.
Sounds like an exciting project. I did something similar in the late 90's. Before OpenGL and DirectX became popular, there were a ton of great books on the subject.
Fundamentally you will have to learn how to
Represent 3D geometry
Transform that geometry (translate and rotate)
Project that geometry onto a 2D screen.
Each of those major topics has many sub-topics (for example, complex objects can be constructed from a number of polygons. You may want to limit polygons to being constructed of triangles only, or support other polygons. You may want to load common model formats e.g. .obj files so that you can create models with off the shelf tools).
The topics are way too broad for a detailed answer here. Whole books are written on the subject, including
Black Art of 3D Game Programming (Book, amazingly still available)
For a good introduction to the general topics, have a look at:
http://en.wikipedia.org/wiki/3D_projection
http://en.wikipedia.org/wiki/Orthographic_projection
http://en.wikipedia.org/wiki/Transformation_matrix#Perspective_projection
Doom, which you already looked at, used a special optimization called heightfield rendering and does not allow for rendering of arbitrary 3D shapes (e.g., you will not find a bridge in Doom that you can walk under).
I have the second edition of Computer Graphics: Principles and Practice in C and it uses SRGP (Simple Raster Graphics Programming) and SIGGRAPH which is a wrap-around SRGP, if you look up articles and papers on graphics research you'll see that both these libraries are used a lot, and they are way more direct and low level than the APIs you mentioned. I'm having a hard time locating them, so if you do, please give a link. Note that the third edition is in WPF, so I cannot guarantee much as to it's usefulness, and I don't know if the second edition is still in print, but I have found numerous references to the book, and it's got it's own page in Wikipedia.
Another solution would be the Win32 API which again does not provide much in terms of rendering, but it is trivial to draw dots and lines onto a window. I have written a few tutorials on it, but I didn't cover drawing pixels and lines, so they'll only be useful if you have trouble with the basics of setting up a window. Note that it is not intended for real-time rendering, so it may get slow.
Finally you can look at X11 programming, the foundation of most modern operating systems with a GUI. I haven't found the libraries for Windows, but again I didn't invest too much time on it. I know it is available for CIGWIN and for Linux in general though, and I believe it would be very interesting to look at the core of graphics since you're already looking under the hood of 3D graphics.

How Scanline based 2d rendering engines works?

Will you please provide me a reference to help me understand how scanline based rendering engines works?
I want to implement a 2D rendering engine which can support region-based clipping, basic shape drawing and filling with anti aliasing, and basic transformations (Perspective, Rotation, Scaling). I need algorithms which give priority to performance rather than quality because I want to implement it for embedded systems with no fpu.
I'm probably showing my age, but I still love my copy of Foley, Feiner, van Dam, and Hughes (The White Book).
Jim Blinn had a great column that's available as a book called Jim Blinn's Corner: A Trip Down the Graphics Pipeline.
Both of these are quited dated now, and aside from the principles of 3D geometry, they're not very useful for programming today's powerful pixel pushers.
OTOH, they're probably just perfect for an embedded environment with no GPU or FPU!
Here is a good series of articles by Chris Hecker that covers software rasterization:
http://chrishecker.com/Miscellaneous_Technical_Articles
And here is a site that talks about and includes code for a software rasterizer. It was written for a system that does not have an FPU (the GP2X) and includes source for a fixed point math library.
http://www.trenki.net
I'm not sure about the rest, but I can help you with fast scaling and 2D rotation for ARM (written in assembly language). Check out a demo:
http://www.modaco.com/content/smartphone-software-games/291993/bbgfx-2d-graphics-library-beta/
L.B.

Drawing component diagrams in TinyUML

I am working on extending a small application that uses the 'dot' tool to draw UML class and state diagrams, to implement component diagrams (I am running into a lot of problems accommodating the UML 2.x notation for the same).
I intend to display the interfaces that a particular component requires and provides through the use of lollipop notations. Now while trying to do so, I am not able to display the edges between two nodes as a straight line. Even if I am able to display one edge as a straight edge, I am unable to maintain that state for all the edges.
Just wanted to know is there any particular way apart from the usual attributes like weight, len (for neato), k, etc.? (or indeed any other tools that u may suggest ?) Appreciate your help.
Best,
Arun
Sorry I never used TinyUML, but as you asked for any other tool suggestion let me tell you that I'm very comfortable using StarUML (Open Source).

Resources