Working on an axonometric construction.
The plan is to have a dimetric projection, with the x, and y axises placed in 41° and -8° to horizontal.
Something like this:
I created groups of paths that I would map to the horizontal plane.
I want to avoid the use of the envelope extension as that opens the closed paths unecessarily and creates double nodes.
Also, it's much faster to just skew and scale the parts to the right sizes.
Figured out how to input the right values to the transformation matrix panel to create a close result.
Unfortunately when I compare a square the same size of the horizontal plane transformed with a matrix to the right size,
I cannot have the EXACT same size I want.
My question is, how to solve this?
Is there a way to edit some pref sections to increase the number of input digits to the transformation panel,
or does it have to do something to the implementation that it cannot be made more accurate?
Edit:
it's a bit theoretical as I could get the exact size since by performing scaling first and then skewing.
But why to have a matrix tool if it is not as accurate?
[solved] transformation matrix
Re: transformation matrix
Hi
This has been a topic earlier; viewtopic.php?f=22&t=13790
"Hard-Coded" values and limits in dialogs are a pain in the neck.
Luckily for all extensions it's relatively easy to edit the dialogs to suit your needs but not so with the "built-in" dialogs.
Maybe you can file a bug report or request on the developers forum to get a remedy in the next version? http://inkscape.org/mailing_lists.php
A workaround is to use the XML editor; from Tavmjong Bah's book;
Transforms with the XML Editor;
Good Luck
RGDS
Ragnar
This has been a topic earlier; viewtopic.php?f=22&t=13790
"Hard-Coded" values and limits in dialogs are a pain in the neck.
Luckily for all extensions it's relatively easy to edit the dialogs to suit your needs but not so with the "built-in" dialogs.
Maybe you can file a bug report or request on the developers forum to get a remedy in the next version? http://inkscape.org/mailing_lists.php
A workaround is to use the XML editor; from Tavmjong Bah's book;
Transforms with the XML Editor;
- Full control over the transformation of an object is available through the XML Editor dialog (Edit → icon XML Editor... (Shift+Ctrl+X)). Selecting an object in the document window will bring up the object's attributes in the XML Editor dialog. Any transform an object is subject to is described by the transform attribute. A transform can be of type “translate”, “scale”, “rotate”, “skewX”, “skewY”, or “matrix”. In most cases, the transform will be of the “matrix” type. A matrix entry contains the Transformation Matrix in the order (A, B, C, D, E, F) where (ACE) is the first row of the matrix.
One thing to note is that the matrix describes a transformation with respect to the User Coordinate System which, if an object is not in a Group, is equivalent to the SVG coordinate system (Initial View Port) where the origin is at the top-left corner of the page (in contrast to the screen coordinate system where the origin is at the bottom-left of the page). See the SVG standard for more details.
Good Luck
RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
Re: transformation matrix
Hi Ragnar and Lazur, I think that Lazur is saying that he IS trying to use the transformation matrix but the results are not precise enough, perhaps because of rounding errors? Both of you are pretty deft programmers are you not, can you throw together a matrix transformation extension that does not do any rounding or uses more places of precision.
Your mind is what you think it is.
Re: transformation matrix
Thank's for the answers!
Thinking it over it might have been the way to solve this by the xml editor.
I just wasn't sure of it.
Tried it with simple paths but there no transformation data appeard in the xml editor after using the transformation matrix through the panel.
I should have tried it with groups as there it appears.
But would raise other problems with translation values.
The original object would have already a translation value, and, by copy/pasting
the right transformation values for a simple mapping would have produced a confusingly shifted result.
Good idea with the extension, but I never had luck with creating them.
Even if I had a new extension that I made by copy/pasting from existing ones, inkscape refused to open.
For an extension alike, it would only be for mapping to paralelograms so
it would be much better if the input data would refer only to the position of the "new origo",
and two digree values and two scale values,
or a forced one containing coordinate values of the three points of the new base vectors.
I'm guessing a simple path could serve as an imput with at least three nodes,
but it could be confusing with finding the first node of the path and the direction of it for a desired mapping.
Thinking it over it might have been the way to solve this by the xml editor.
I just wasn't sure of it.
Tried it with simple paths but there no transformation data appeard in the xml editor after using the transformation matrix through the panel.
I should have tried it with groups as there it appears.
But would raise other problems with translation values.
The original object would have already a translation value, and, by copy/pasting
the right transformation values for a simple mapping would have produced a confusingly shifted result.
Good idea with the extension, but I never had luck with creating them.
Even if I had a new extension that I made by copy/pasting from existing ones, inkscape refused to open.
For an extension alike, it would only be for mapping to paralelograms so
it would be much better if the input data would refer only to the position of the "new origo",
and two digree values and two scale values,
or a forced one containing coordinate values of the three points of the new base vectors.
I'm guessing a simple path could serve as an imput with at least three nodes,
but it could be confusing with finding the first node of the path and the direction of it for a desired mapping.
Re: transformation matrix
Hi.
Druban;
Good idéa! (Why did'nt I think of that?)
Lazur;
Is this something you would use? (Not much point in investing time making something that's never used.)
Quote from Jerry Pournelle (from BYTE magazine (remember that?) Chaos Manor column and now Circuit Cellar Magazine);
My favorite programming language is solder!
RGDS
Ragnar
Druban;
Both of you are pretty deft programmers are you not, can you throw together a matrix transformation extension that does not do any rounding or uses more places of precision.
Good idéa! (Why did'nt I think of that?)
Lazur;
Is this something you would use? (Not much point in investing time making something that's never used.)
Quote from Jerry Pournelle (from BYTE magazine (remember that?) Chaos Manor column and now Circuit Cellar Magazine);
My favorite programming language is solder!
RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
Re: transformation matrix
I used the transformation panel with a scaling and with a skewing after,
then used the align and distribute panel.
For 48 axonometric parts like on that image, and the time factor was reasonable with it.
Not sure of how useful it would be.
It would really give a boost for drawing in axonometry if any manual imputs were refused to the minimum.
Like the previous description would take too many manually counted imput factors.
Maybe because I had the existing method on my mind.
Because, for example if you could define the origo of the axises,
three digree for each axises, and scale factors,
that all could be stored like in the transformation panel,
and you could choose on which base plane you want the object to be mapped to, then
it would end up in a more handy panel for constructing.
In other cases a simple map to paralelogram-triangle- similar to the envelope extension would be better.
I would use it more often then like rendering the current gears I guess.
Another guess would be from me that creating an extension wich creates correct evolvent tooth profiled gears would make a better use
-more of cad like feature for the mechanical field.
then used the align and distribute panel.
For 48 axonometric parts like on that image, and the time factor was reasonable with it.
Not sure of how useful it would be.
It would really give a boost for drawing in axonometry if any manual imputs were refused to the minimum.
Like the previous description would take too many manually counted imput factors.
Maybe because I had the existing method on my mind.
Because, for example if you could define the origo of the axises,
three digree for each axises, and scale factors,
that all could be stored like in the transformation panel,
and you could choose on which base plane you want the object to be mapped to, then
it would end up in a more handy panel for constructing.
In other cases a simple map to paralelogram-triangle- similar to the envelope extension would be better.
I would use it more often then like rendering the current gears I guess.
Another guess would be from me that creating an extension wich creates correct evolvent tooth profiled gears would make a better use
-more of cad like feature for the mechanical field.
Re: transformation matrix
Created this as a pd image at openclipart:
Will create another image(s) showing how to set the transformations right to map to the base planes.
description wrote:For some design I was working in dimetry, depicted with this image.
Dimetry refers to that two of the axises scale factor is the same.
That description covers a large variety of axonometric views though.
The scale factors and the angles I chose result that if you mirror the y axis along x axis, you will get z axis.
There are similar dimetry-s that are used more often, like the so-called
conventional axonometry.
Here is an image of that (original author unknown).
Another commonly used one has it's axises at 97°; 131,5°; 131,5°,
and some may even use different scale factors too.
To me this one seemed a more trivial choice.
Image drawn with inkscape.
There are three invisible planes included in the svg, to make mapping of objects easier.
Will create another image(s) showing how to set the transformations right to map to the base planes.
Re: transformation matrix
Here is what I figured out with the transformational matrix:
Tried to imput more accurate numbers through the xml editor but it all seems messed up:
it results in a horizontally mirrored object than if the values typed in the transform object panel.
Even if mirrored back, it doesn't seem to match with the desired shape.
Are those values counted wrong, or it's all that much inaccuracy?
By the way on the useage, it would be a connect between inkscape and blender.
Unfortunately I have no idea on the blender part too, as created a topic on that at blenderartists and noone replied yet.
http://blenderartists.org/forum/showthread.php?307699-Camera-setting-up-problem
ragstian wrote:...
A workaround is to use the XML editor; from Tavmjong Bah's book;
Transforms with the XML Editor;...In most cases, the transform will be of the “matrix” type. A matrix entry contains the Transformation Matrix in the order (A, B, C, D, E, F) where (ACE) is the first row of the matrix.
...
Tried to imput more accurate numbers through the xml editor but it all seems messed up:
it results in a horizontally mirrored object than if the values typed in the transform object panel.
Even if mirrored back, it doesn't seem to match with the desired shape.
Are those values counted wrong, or it's all that much inaccuracy?
By the way on the useage, it would be a connect between inkscape and blender.
Unfortunately I have no idea on the blender part too, as created a topic on that at blenderartists and noone replied yet.
http://blenderartists.org/forum/showthread.php?307699-Camera-setting-up-problem
Re: transformation matrix
Hi
I am a little puzzled at your values for the transformations.
Is your figure of the XYZ axes (the red, green and blue) from before the transformation or after?
The degree values given in examples on the net (your 98° - 131° - 131° ) shows the angles to be used for drawing on a 2d plane (paper).
My understanding (which might be incorrect - has happened before!) is that these values can not be used directly in transformations in Inkscape as the "UP vector" will then be tilting!
I might have misunderstood your explanation.
(I made a short video in POVray to convince myself) https://www.dropbox.com/s/wqwj9wtns2i6qxx/video.mpg
(In the video the transformation order is; 98° around X-Axis - then 131° around Y-Axis followed by 131° around the Z-Axis.)
To get isometric projection in blender you can turn "perspective" off! - Same in POVRAY where you specify; camera = isometric
Example file plus basis for animation from this site - go explore - it's a goldmine! http://www.f-lohmueller.de/index_d.htm
In Inkscape the transformations are all "added" up, I had problems getting it right in XML editor until I removed earlier transformations.
Some useful (or not) info;
http://home.comcast.net/~tamivox/redbear/axono/index.html
http://www.petercollingridge.co.uk/interactive-svg-components/isometric-projection
http://users.tpg.com.au/rivit/rvt-simcity-articles2.htm
RGDS
Ragnar
I am a little puzzled at your values for the transformations.
Is your figure of the XYZ axes (the red, green and blue) from before the transformation or after?
The degree values given in examples on the net (your 98° - 131° - 131° ) shows the angles to be used for drawing on a 2d plane (paper).
My understanding (which might be incorrect - has happened before!) is that these values can not be used directly in transformations in Inkscape as the "UP vector" will then be tilting!
I might have misunderstood your explanation.
(I made a short video in POVray to convince myself) https://www.dropbox.com/s/wqwj9wtns2i6qxx/video.mpg
(In the video the transformation order is; 98° around X-Axis - then 131° around Y-Axis followed by 131° around the Z-Axis.)
To get isometric projection in blender you can turn "perspective" off! - Same in POVRAY where you specify; camera = isometric
Example file plus basis for animation from this site - go explore - it's a goldmine! http://www.f-lohmueller.de/index_d.htm
In Inkscape the transformations are all "added" up, I had problems getting it right in XML editor until I removed earlier transformations.
Some useful (or not) info;
http://home.comcast.net/~tamivox/redbear/axono/index.html
http://www.petercollingridge.co.uk/interactive-svg-components/isometric-projection
http://users.tpg.com.au/rivit/rvt-simcity-articles2.htm
RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
Re: transformation matrix
The axises shown are as they would look in 2D.
The angles written are showing merely how those axises would look on a 2D plane -paper-.
With the given scale factors it is not an orthogonal axonometry per se.
There are some similar dimetries with scale factors making it for an orthogonal view,
but this uses qx=0,5, xy=qz=1.
Like if it was all done on paper, those values could be constructed much easier.
While it IS close to an orthogonal view in look.
It is a bit illogical to give scale factors for the axises in orthogonal axonometry by the way.
Here is an example of an orthogonal projected dice:
http://www.math.bme.hu/~zlangi/descriptivegeometry/orthogonal_axonometry.pdf
If that was the goal, I would have asked for rotation angle values to write into the render 3D polyhedrons extension.
Which would be a too complicated way of drawing things in inkscape.
I know I can set a camera to be ortographic in blender, but these are different axonometric projections.
At that blenderartist topic I described an ugly solution for doing it.
For example, creating a military perspective would be
of setting the camera like in (0;-15;15), with a rotation value of (45°;0°;0°),
and scaling the model in x dimension with 0,707 factor.
But I'm not sure if the shadows would turn out right in cycles.
Also scaling the model and setting the camera for this dimetric look is a bit problematic that way.
At the same post I quoted the wikipedia's projection example's povray source file
I am not sure though if it doesn't describe an orthogonal projection.
With the "oblique" -military perspective- projected models the different scale factors are more evident.
Which are not displayed right here in the forum,the image is way too big for that:
http://upload.wikimedia.org/wikipedia/commons/archive/4/41/20091120003734%21Graphical_projection_comparison.png
Sticking here with the original inkscape purpose: how to construct drawings in this dimetric axonometry.
By drawing only in 2D.
Let's say I have the side and top views drawn before, that I would like to transform
as they were on the actual xz and xy planes.
That means I have to "map" those somehow to these planes.
So figured out these transformation values, to be used on each of the views.
Actually this won't affect the "up" to be tilted.
I cannot recall which description of transformation matrix I saw,
but all those values can be checked on the xy, xz, yz plane's paralelograms.
They all have a value of x and y sizes of the path's right segments, with right senses.
Not mentioning again that those senses need to be changed if typed through the xml editor, as if not it produces a mirrored result.
And the fact that unfortunately even with those values the result is far from being accurate.
Will get together what transformations worked instead of the transformation matrix.
It is a bit more complicated as with the scale and skew values length dimensions were added.
The reason why an extension would be a boost for mapping many different sized objects without grouping them together, one by one, accurately.
The angles written are showing merely how those axises would look on a 2D plane -paper-.
With the given scale factors it is not an orthogonal axonometry per se.
There are some similar dimetries with scale factors making it for an orthogonal view,
but this uses qx=0,5, xy=qz=1.
Like if it was all done on paper, those values could be constructed much easier.
While it IS close to an orthogonal view in look.
It is a bit illogical to give scale factors for the axises in orthogonal axonometry by the way.
Here is an example of an orthogonal projected dice:
http://www.math.bme.hu/~zlangi/descriptivegeometry/orthogonal_axonometry.pdf
If that was the goal, I would have asked for rotation angle values to write into the render 3D polyhedrons extension.
Which would be a too complicated way of drawing things in inkscape.
I know I can set a camera to be ortographic in blender, but these are different axonometric projections.
At that blenderartist topic I described an ugly solution for doing it.
For example, creating a military perspective would be
of setting the camera like in (0;-15;15), with a rotation value of (45°;0°;0°),
and scaling the model in x dimension with 0,707 factor.
But I'm not sure if the shadows would turn out right in cycles.
Also scaling the model and setting the camera for this dimetric look is a bit problematic that way.
At the same post I quoted the wikipedia's projection example's povray source file
Code: Select all
#case (2) // dimetric #local cam_area = 2;
#local cam_loca = -z * cam_dist;
#local cam_dirc = +z;
#local cam_rgvc = +x * cam_area;
#local cam_upvc = +y * cam_area/cam_aspc;
#local cam_tran = transform
{
rotate +x * asind(tand(15))
rotate +y * 045
translate +y * cam_move }
I am not sure though if it doesn't describe an orthogonal projection.
With the "oblique" -military perspective- projected models the different scale factors are more evident.
Which are not displayed right here in the forum,the image is way too big for that:
http://upload.wikimedia.org/wikipedia/commons/archive/4/41/20091120003734%21Graphical_projection_comparison.png
Sticking here with the original inkscape purpose: how to construct drawings in this dimetric axonometry.
By drawing only in 2D.
Let's say I have the side and top views drawn before, that I would like to transform
as they were on the actual xz and xy planes.
That means I have to "map" those somehow to these planes.
So figured out these transformation values, to be used on each of the views.
Actually this won't affect the "up" to be tilted.
I cannot recall which description of transformation matrix I saw,
but all those values can be checked on the xy, xz, yz plane's paralelograms.
They all have a value of x and y sizes of the path's right segments, with right senses.
Not mentioning again that those senses need to be changed if typed through the xml editor, as if not it produces a mirrored result.
And the fact that unfortunately even with those values the result is far from being accurate.
Will get together what transformations worked instead of the transformation matrix.
It is a bit more complicated as with the scale and skew values length dimensions were added.
The reason why an extension would be a boost for mapping many different sized objects without grouping them together, one by one, accurately.
Re: transformation matrix
So here it is:
If you have a square with it's side being "a" long, after transforming it with these values, they will be turned to the right shapes.
Here is a part of the drawing:
-a bit larger rendering if you click on it-
All axonometry drawing done in inkscape.
Hell of a work and there are some parts that I may create another topic for.
(By the way this is just some part to illustrate what to be programmed later on with those cassini ovals for that letter calligraphy started waaay back...
http://www.inkscapeforum.com/viewtopic.php?f=20&t=14017
http://www.inkscapeforum.com/viewtopic.php?f=34&t=14056)
If you have a square with it's side being "a" long, after transforming it with these values, they will be turned to the right shapes.
Here is a part of the drawing:
-a bit larger rendering if you click on it-
All axonometry drawing done in inkscape.
Hell of a work and there are some parts that I may create another topic for.
(By the way this is just some part to illustrate what to be programmed later on with those cassini ovals for that letter calligraphy started waaay back...
http://www.inkscapeforum.com/viewtopic.php?f=20&t=14017
http://www.inkscapeforum.com/viewtopic.php?f=34&t=14056)
Re: transformation matrix
Just found out there is an extension covering these transformations:
https://bugs.launchpad.net/inkscape/+bug/1362534
https://bugs.launchpad.net/inkscape/+bug/1362534