vector-graphics

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

陌路散爱 提交于 2019-12-07 11:55:13
问题 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. 回答1: Generally speaking, you can't decompose the final transformation matrix into its

XSL Transform SVG to VML

本小妞迷上赌 提交于 2019-12-07 07:47:56
问题 I don't know anything about VML except that Internet Explorer and other Microsoft products use it and that it is a vector graphics format. Can one use XSLT to transform an SVG document to VML? Or are they too different from one another to make this possible? I know that there exist XSLT documents to transform SVG to XAML. 回答1: I haven't used it, but there's a sourceforge project Vector Converter that seems to do exactly that. 回答2: As a more general answer to this question, you can, VML as it

Formats for Saving Vector-based 3D Graphics

*爱你&永不变心* 提交于 2019-12-07 04:14:52
问题 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? 回答1: 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

Is there any scripting SVG editor?

邮差的信 提交于 2019-12-07 00:37:46
问题 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 回答1: You could use something like lxml - after all SVG files

rasterizing matplotlib axis contents (but not frame, labels)

可紊 提交于 2019-12-06 21:34:06
问题 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

inkscape plugin to live edit svg code

蹲街弑〆低调 提交于 2019-12-06 17:10: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

Fast library to replace CDC vector graphics

拟墨画扇 提交于 2019-12-06 16:13:08
I have a mature MFC C++ application that displays on screen and prints using CDC wrappings on the Win32 GDI. While it has been optimized over the years, I would like to replace it with something a bit faster. The graphics included rendered triangular surface models, complex polylines and polygons, and lots of text. It needs to meet the following criteria; The number of vectors displayed is likely to be very large. For example a single surface triangle is likely to generate a number lines and solid fills when rendered. At present this information is not stored anywhere, it is generated and

How to add image to Path in PaperJS

泄露秘密 提交于 2019-12-06 14:34:09
I am playing around with the nice code from http://paperjs.org/examples/candy-crash/ . I want to replace the colors with an image so that instead of showing say a red circle, it should show a circle with an image inside. Here is the snippet I think I need to modify: function Ball(r, p, v) { this.radius = r; this.point = p; this.vector = v; this.maxVec = 15; this.numSegment = Math.floor(r / 3 + 2); this.boundOffset = []; this.boundOffsetBuff = []; this.sidePoints = []; this.path = new Path({ fillColor: { hue: Math.random() * 360, saturation: 1, brightness: 1 }, blendMode: 'screen' }); for (var

How to show a subsection or “slice” of an SVG graphic?

牧云@^-^@ 提交于 2019-12-06 07:39:09
问题 Is there any way to slice an SVG . I mean any already available lib . I need to implement this slicing component in Java. I mean , I have single SVG file and based rulers/scales i choose graphically , I want to slice the single SVG into different SVG files. Hope I am clear 回答1: Yes, although, you'd think this was classified information - or just simply impossible - based on how hard it is to find this basic fact.... Apparently , all you need to do is reference the viewBox from a URI "fragment

EMF with forced antialiasing

倾然丶 夕夏残阳落幕 提交于 2019-12-06 06:09:59
问题 Our program needs to generate vector graphics, and we chose EMF for that. However, it seems that other programs render these images non-antialiased. I found that SVG format does have a flag to indicate that some/all objects should be antialiased. Is there any kind of flag or command inside the EMF format to indicate that we want to have antialiasing? If so, how to generate that command using System.Drawing.Imaging.Metafile class? Thank you. 回答1: EMF file is a list of GDI commands. So it won't