I want to draw a graph like the one i've attached here:
I dont wanna re invent the wheel and start to draw circles and so on, so i googled for libraries and what i found is Graph#. Unfortunately there is no documentation/tutorial, so i'm a little confused that is this what i need or not!
What I need is to be able to choose colors for vertexes, set font and size, thickness of edges and distance from the root. Anyone can help me? Any example of graph#? any other library?
Any help is appreciated, thanks
You can achieve this using the GraphX library based on Graph# (http://graphx.codeplex.com)
Although some modifications will be needed to do so such as templates change or algorithm customizations. If you have any questions please feel free to ask in the Discussions page on the site. Cheers.
Related
I was wondering what best approach to take when trying to implement pathfinding but without using a grid.
In this example, the player is a able to place road tiles on a grid, but I only want to pathfind the placed roads (no need to compute for the whole map).
I've tried a couple things but with no luck.
Any help would be appreciated.
Thanks in advance.
I think you are looking for A* algorithm. There are also other ways to do this, but most of them are based on graphs, including Unity NavMesh.
There is amazing site with interactive examples and implementation guide, for sure it will be helpful, whether you want to implement this yourself or just understand how it works:
https://www.redblobgames.com/pathfinding/a-star/introduction.html
we have a project at university where we have to create fractals that are controllable by the user (with kinect). We are still in an early phase where we evaluate some ideas (though we already got some working prototypes). Our idea right now is to use a blackboard-image as background and draw the fractals on top of it. To make this look more natural we'd like to use some crayon effects on the lines we draw.
Our internet-research produced two main ideas to achieve this:
Paint an image of a photoshop-like brush for every moueposition of a line.
Use shaders on drawline-functions.
The first does work for an early test, but looks awful. I guess the latter would be the best approach, but the information in the internet seems to be lacking regarding this topic. At least I didn't find anything that really helped a lot. The Questions is:
Has anyone links or general tips on how to achieve this effect, or is it not possible in C#/WPF. Might there be an even better way? And how can I apply a created shader to drawline-method/brushes?
Thanks in advance and kind regards
Michael
EDIT
Nice tip from #Bradley Uffner ! (unfortunately he deleted his answer)
There is a tutorial here on how to achieve such effect :
http://alastaira.wordpress.com/2013/11/01/hand-drawn-shaders-and-creating-tonal-art-maps/
Another thing I've found recently which might interests you :
http://blogs.msdn.com/b/hemipteran/archive/2014/03/26/generating-noise-for-applications.aspx
I've didn't read well the title of your question, Windows Forms do not support shaders at all.
Be more specific about the meaning of a crayon shader
Regarding using shaders in WPF, you cannot apply them at a line-level but on a Control level instead.
This the class representing a shader in WPF:
http://msdn.microsoft.com/en-us/library/system.windows.media.effects.effect(v=vs.110).aspx
What I suggest
use an Image and set its Source property to use a WriteableBitmap
use the excellent WriteableBitmapEx library to easily draw on it, basically it's the WriteableBitmap in WPF but with many extension methods for drawing lines, circles, rectangles etc ...
then apply your shader to the Effect property of Image
For developing your shader
Use Shazzam, it allows you to develop an HLSL shader for WPF in a cool interface, preview it instantly and it will generate the Effect class ready to paste on your project.
There might be a couple of interesting shader for you in DOSBox SVN-Daum
Here's an example of the cartoon shader :
Obviously there will be quite some work as copy-pasting the shader to Shazzam won't work right away but you'll know what are the maths behind achieving the effect.
Mark the answer as accepted if you are satisfied with it :D if not edit your question and add more details.
I have some shape files (shp,shx,dbf) and I want to load them in a division using c#.net, currently I am using easy Gis for web, I want to add the ability for the user to be able to draw a polygon over map so that a closed area is defined , and I want this polygon coordinates so that I can define whether some places are in polygon or not.
Any Idea what is the best plugin or anything for .net , is it possible to be done in Easy GIS?
I would appreciate your help.thanks
P.S:
I should mention that I need this to be done on a webpage, so desktop softwares are useless.
after days of searching ,I found the follwoing link very useful: wiki.openstreetmap.org/wiki/OpenLayers_Local_Tiles_Example OpenLayers is a free javascript libray that gives you lots of functionality like drawing polygons and etc ...
I am just wondering if it's possible to create a WPF application that allows users to use a certain pen to plot directions to make a certain path and able to display the path data.
The idea is almost the same with this one: http://blogs.msdn.com/b/gavingear/archive/2007/02/15/intoducing-pathmaker-a-tool-for-creating-path-markup-for-wpf-e.aspx
I also found a good sample where I can draw lines and stuff inside the canvas: http://www.codeproject.com/KB/WPF/WPF_DrawTools.aspx
I'm just looking for a good head start. Any suggestions?
Jesema is another one that might be helpful for you:
http://marlongrech.wordpress.com/jasema/
If you want something where you can draw stuff inside a canvas, there's livegeometry
http://livegeometry.codeplex.com/
but that one has the path data abstracted away (that's more similar to your draw tools example).
Hope those help!
I know this question is quite old, but I found that Inkscape supports save to XAML.
See this article: http://www.software-architects.com/devblog/2008/01/13/Graphic-In-XAML-And-WPF
I read a topic in this site about it, but decided to post another one as I want to write such a tool, but I don't have much experience in C# & .NET, so it could take me too much time just digging the Net, while someone can just direct me to the right library or classes to be used.
So, straight to the point. I want to write a tool that, when activated, inverts absolutely all items on the screen and lets you work that way without torturing your eyes with bright light colors.
Does anyone have an idea of the needed .NET libraries or third-party frameworks, to implement this?
Any help will be greatly appreciated!
P.S. Changing to "High Contrast" theme in Windows is not the solution I seek, so please, don't mention it!
Control Panel → Accessibility Options → Display → Use High Contrast.
Give that a whirl. Sorry it does not answer your question directly but may save you some time.