vector-graphics

Cannot render vector tiles (.mbtiles) file with leaflet

送分小仙女□ 提交于 2019-12-06 04:55:20
I am trying to render some locally-stored and vector-based tiles download from OpenMapTile. The reason I am doing that is because my end application will only run on a computer that cannot be connected to the internet. I have read many different things on whether or not leaflet can render vector-based tiles but it seems that it can from some examples. It seems that it is not possible with Vector Grid that only does raster tiles but that it is possible with Leaflet.TileLayer.MBTiles So I tried to do just that but always stumble upon an empty page when trying it out... I have the controllers for

findHomography() / 3x3 matrix - how to get rotation part out of it?

≯℡__Kan透↙ 提交于 2019-12-05 18:52:09
As a result to a call to findHomography() I get back a 3x3 matrix mtx[3][3]. This matrix contains the translation part in mtx[0][2] and mtx[1][2]. But how can I get the rotation part out of this 3x3 matrix? Unfortunaltely my target system uses completely different calculation so I can't reuse the 3x3 matrix directly and have to extract the rotation out of this, that's why I'm asking this question. Generally speaking, you can't decompose the final transformation matrix into its constituent parts. There are some certain cases where it is possible. For example if the only operation preceding the

2D vector modelling for game development

大城市里の小女人 提交于 2019-12-05 17:43:05
问题 Making my Asteroids clone (in C) I've rather fallen in love with vector-based entities, but I've simply coded them in as x,y-point arrays. That's been fine for something like Asteroids, but what should I do if I want to make more complex 2D models? I note that there is an awful lot of 3D modelling software out there, as well as ample tutorials and help on importing 3D models into one's C/C++ program for use with Open GL. However I'm rather more interested in creating 2D vector-based models

Sort points by angle from given axis?

混江龙づ霸主 提交于 2019-12-05 13:42:07
问题 How can I sort an array of points/vectors by counter-clockwise increasing angle from a given axis vector? For example: If 0 is the axis vector I would expect the sorted array to be in the order 2, 3, 1 . I'm reasonably sure it's possible to do this with cross products, a custom comparator, and std::sort() . 回答1: Yes, you can do it with a custom comparator based on the cross-product. The only problem is that a naive comparator won't have the transitivity property. So an extra step is needed,

Formats for Saving Vector-based 3D Graphics

大城市里の小女人 提交于 2019-12-05 09:53:56
I have written a vector-based 3D editor (UI customized somewhat like technical drawings). I now want save the vectors/drawing data in portable formats. Which formats are available; which (one?) of them are the most widely accepted, and where can I get hold of the format specifications? Commercially, many users will look for AutoCAD DWG and Bentley DGN formats. While not free, libraries for producing these formats can be found from the open design alliance The GIS community use shape files quite a bit for vectorised 3d models, a free SDK for shape files can be found here . The OSG library is

Is there any scripting SVG editor?

旧城冷巷雨未停 提交于 2019-12-05 05:41:15
I would like to edit SVG files using some scripting language (preferably Python). In particular, I would like to merge two SVG files, add some annotations, and arrange them in a larger image. Is there any software available for such purposes? Thanks, Bartosz UPDATE I finally decided to use the approach proposed by nosklo. You can find the code of SVG handling python module on github repo . I also described how to use it in this post nosklo You could use something like lxml - after all SVG files are XML. It's available from PyPI pip: https://pypi.python.org/pypi/lxml/ I don't know if you could

Converting pdf to vector image

怎甘沉沦 提交于 2019-12-05 05:30:27
问题 I'm trying to use pdf content (mathematics) in my webpage. I basically want to convert the pdf to some vector image. Converting the pdf to swf does the job very well, but as flash isn't supported on every platform, I'm trying to find another solution. I read about svg, but as those pdf's contain a lot of mathematics, the result of the converters I found is really ugly and incorrect. I've also thought about retyping the latex, and displaying it using mathjax, in some way this is the best

rasterizing matplotlib axis contents (but not frame, labels)

独自空忆成欢 提交于 2019-12-05 02:33:09
For an article I am generating plots of deformed finite element meshes, which I visualize using matplotlib's polycollection. The images are saved as pdf. Problems arise for high density meshes, for which the naive approach results in files that are too large and rendering too intensive to be practical. For these meshes it really makes no sense to plot each element as a polygon; it could easily be rasterized, as is done when saving the image as jpg or png. However, for print I would like to hold on to a sharp frame, labels, and annotations. Does anyone know if it is possible to achieve this

inkscape plugin to live edit svg code

試著忘記壹切 提交于 2019-12-04 22:39:53
I'm looking for a plugin for inkscape (or any vector based editor for that matter) to see a window with the code next to the window with the graphical objects for SVGs. Both windows would be dynamic, meaning that if you change something in the graphical view it automatically updates the code, and changing the code would automatically update the graphical object. Also it would be nice if selecting an object would highlight the relevant code. I have had a look here but didn't see anything like this: http://wiki.inkscape.org/wiki/index.php/Extension_repository Does anything like this exist or

How do I convert an Illustrator file to a path for WPF

最后都变了- 提交于 2019-12-04 19:08:03
问题 Our graphics person uses Adobe Illustrator and we'd like to use her images inside our WPF application as paths. Is there a way to do this? 回答1: We use Expression Design to do this. Unfortunately, there currently is no free beta preview like Blend 2.5, however, you can download a trial copy (which I think you can use for 90 days). If you don't want to go this route, I know that a lot of people also use Mike Swanson's exporter that is pointed to by curtisk above. 回答2: This should fit the bill