2D to 3D?
-
- Posts: 8
- Joined: Thu May 15, 2014 9:43 pm
2D to 3D?
Dear all,
I just started using Inkscape, and it seems to have many possibilities!
There is a specific thing I would like to do:
- I have a 2D 'picture', a figure of a deep ocean transect to be precise.
- I want it to look '3D', as shown in the examples on the right hand side of my figure-under-construction (look in file dropbox link below), - by extending the figure boundaries under an angle to create a 3D effect.
Can this be done in Inkscape?
Thank you!
link: https://www.dropbox.com/s/6bprfw7n58y4q ... figure.svg
I just started using Inkscape, and it seems to have many possibilities!
There is a specific thing I would like to do:
- I have a 2D 'picture', a figure of a deep ocean transect to be precise.
- I want it to look '3D', as shown in the examples on the right hand side of my figure-under-construction (look in file dropbox link below), - by extending the figure boundaries under an angle to create a 3D effect.
Can this be done in Inkscape?
Thank you!
link: https://www.dropbox.com/s/6bprfw7n58y4q ... figure.svg
-
- Posts: 8
- Joined: Thu May 15, 2014 9:43 pm
Re: 2D to 3D?
Should I add some more information for people to be able to help me?
Re: 2D to 3D?
Hi.
To go from 2d to 3d in inkscape is fairly simple as long as you do isometric projection as in your example.
Doing 'true' 3d perspective is still possible but a little more complicated.
To 'transform' to isometric use the (you guessed it) transform dialog. Shift + Ctrl + M
First select the angle you want, I have used 30 degrees as this fits the axionometric grid as well.
Then use skew with negative angle - then rotate angle - horizontal as in first part of example.
Do it the 'other way around' if you want your image on 'the other side'.
(The extra 'borders have been added manually using 'snap to grid'.)
See Example below;

Sorry for the rather short & quick explanation - 'real' work getting in the way!
Chime back if you need more assistance.
Good Luck!
RGDS
Ragnar
To go from 2d to 3d in inkscape is fairly simple as long as you do isometric projection as in your example.
Doing 'true' 3d perspective is still possible but a little more complicated.
To 'transform' to isometric use the (you guessed it) transform dialog. Shift + Ctrl + M
First select the angle you want, I have used 30 degrees as this fits the axionometric grid as well.
Then use skew with negative angle - then rotate angle - horizontal as in first part of example.
Do it the 'other way around' if you want your image on 'the other side'.
(The extra 'borders have been added manually using 'snap to grid'.)
See Example below;

Sorry for the rather short & quick explanation - 'real' work getting in the way!
Chime back if you need more assistance.
Good Luck!
RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
-
- Posts: 8
- Joined: Thu May 15, 2014 9:43 pm
Re: 2D to 3D?
Dear Ragnar,
Thank you for your post.
This is however not the solution I am looking for; The top and side of the graph have to be filled with an 'extrapolation' of the borders of the figure.
An example of that is provided in the file in my Dropbox, or seperately also here: https://www.dropbox.com/s/q5801rvpncsow ... _marie.pdf.
Is that possible as well in Inkscape?
Thank you for your post.
This is however not the solution I am looking for; The top and side of the graph have to be filled with an 'extrapolation' of the borders of the figure.
An example of that is provided in the file in my Dropbox, or seperately also here: https://www.dropbox.com/s/q5801rvpncsow ... _marie.pdf.
Is that possible as well in Inkscape?
Re: 2D to 3D?
Your model is somehow... inconsistent? Should the red portions be toward center or not? ,)
"...by extending the figure boundaries under an angle to create a 3D effect."
This could mean a tone of different things. Could you be a bit more specific?
Interpolation could be a solution (check the Inkscape manual, especially the part about the LPE`a and Interpolation)
"...by extending the figure boundaries under an angle to create a 3D effect."
This could mean a tone of different things. Could you be a bit more specific?
Interpolation could be a solution (check the Inkscape manual, especially the part about the LPE`a and Interpolation)
Re: 2D to 3D?
Hi
Sorry for the misunderstanding!
Of course everything is possible in inkscape.
To get the effect you want you have to 'break up' the image somewhat and use the 'parts' individually.
The tops can be made if you make an image of the upper one pixel of the original and then stretch the image and perform the 'skew & rotate magic'.
Same for the axes, just turn them into separate images before importing into Inkscape.
By the way - your project is a perfect candidate for python and matplotlib.
How did you generate the graphs?
I can make some examples as soon as I am through with my 'chores'.
You just have to wait for us ta wake up!!
RGDS
Ragnar
Sorry for the misunderstanding!
Of course everything is possible in inkscape.
To get the effect you want you have to 'break up' the image somewhat and use the 'parts' individually.
The tops can be made if you make an image of the upper one pixel of the original and then stretch the image and perform the 'skew & rotate magic'.
Same for the axes, just turn them into separate images before importing into Inkscape.
By the way - your project is a perfect candidate for python and matplotlib.
How did you generate the graphs?
I can make some examples as soon as I am through with my 'chores'.
Should I add some more information for people to be able to help me?
You just have to wait for us ta wake up!!

RGDS
Ragnar
Last edited by ragstian on Sat May 17, 2014 12:36 am, edited 1 time in total.
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
-
- Posts: 8
- Joined: Thu May 15, 2014 9:43 pm
Re: 2D to 3D?
@Maestral: This is just an example, it is 3 times exactly the same plot just taken from the web. I will produce similar plots (using Matlab and/or a nice Ocean Data Viewer called ODV) later during my research project. I found it difficult to explain the boundaries part - I think Ragstian understood it. If you check the examples I linked to, you will probably understand what I mean.
@Ragnar: No of course thank you for your time! I will try what you are describing, but the working week is almost over so I will probably really attack this again on Monday:-). I am very curious about your comment on Python and matplotlib; it would be great to be able to create a view on 3 Antarctica transects without manipulating too much every time - e.g. a script! I will likely create transects with the same dimensions every time, so I just need the manipulation to get them into a nice picture.. One of the reasons I chose Inkscape, is that you can link to a file and when you update the file, all adjustments to the previous file will be applied to the new one instead- thereby making it fairly simple to plot them this way.
@Ragnar: No of course thank you for your time! I will try what you are describing, but the working week is almost over so I will probably really attack this again on Monday:-). I am very curious about your comment on Python and matplotlib; it would be great to be able to create a view on 3 Antarctica transects without manipulating too much every time - e.g. a script! I will likely create transects with the same dimensions every time, so I just need the manipulation to get them into a nice picture.. One of the reasons I chose Inkscape, is that you can link to a file and when you update the file, all adjustments to the previous file will be applied to the new one instead- thereby making it fairly simple to plot them this way.
Last edited by anne_inkscape on Sat May 17, 2014 12:52 am, edited 1 time in total.
Re: 2D to 3D?
Hi.
I am sure we can work something out.
( Matlab is out of my 'leauge' due to high cost! Most of what you do in matlab can be done in python!)
You can send me a PM with mail info if you wish.
RGDS
Ragnar
I am very curious about your comment on Python and matplotlib;
I am sure we can work something out.
( Matlab is out of my 'leauge' due to high cost! Most of what you do in matlab can be done in python!)
You can send me a PM with mail info if you wish.
RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
Re: 2D to 3D?
Off topic:
Fingers crossed.Would like to see what would the two of you come up with
Re: 2D to 3D?
Hello there,
this topic might be helpful to map precisely a diagram ortographically, as vectors:
http://www.inkscapeforum.com/viewtopic.php?f=5&t=16307.
Also, it may not be totally necessary to have vector images for the result.
You may try to use blender, which way you can make it 3D from the start and render images much faster.
this topic might be helpful to map precisely a diagram ortographically, as vectors:
http://www.inkscapeforum.com/viewtopic.php?f=5&t=16307.
Also, it may not be totally necessary to have vector images for the result.
You may try to use blender, which way you can make it 3D from the start and render images much faster.
Re: 2D to 3D?
Hi.
Lazur, the formulas might come in handy.
Maybe an extension could do the transforms 'automagically".
RGDS
Ragnar
Lazur, the formulas might come in handy.
Maybe an extension could do the transforms 'automagically".
RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
Re: 2D to 3D?
Hi.
By slicing the original, import into Inkscape and rotate & skew it's possible to get (close to) what you want;

The 'faint' areas on the top comes from stretching a one pixel high image in Inkscape - for some reason
it gets a 'gradient' - this can be fixed as seen on the left by stacking more images or stretching it in a bitmap editor first.
Good Luck
RGDS
Ragnar
By slicing the original, import into Inkscape and rotate & skew it's possible to get (close to) what you want;

The 'faint' areas on the top comes from stretching a one pixel high image in Inkscape - for some reason
it gets a 'gradient' - this can be fixed as seen on the left by stacking more images or stretching it in a bitmap editor first.
Good Luck
RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
-
- Posts: 8
- Joined: Thu May 15, 2014 9:43 pm
Re: 2D to 3D?
This indeed looks like what I want! Because of the slicing however, it won't be 'automatic'.
What I would like to make, is an Inkscape figure referring (linking!) to figures 1,2 and 3 (which are depth profiles as pictured above) and if I update these figures, the Inkscape figure will be updated as well.
I am quite sure that doesn't work any more after slicing, it only 'remembers' the transformations/changes you made to the figure itself.
Are there any more suggestions on an 'automatic' version of this? Or maybe someone knows of an extension that would fit my needs:)?
The use of Blender (which I tried for a short period and didn't understand..) would make it manipulative and non-'automatic', so I would like to do everything in one program, e.g. Inkscape.
What I would like to make, is an Inkscape figure referring (linking!) to figures 1,2 and 3 (which are depth profiles as pictured above) and if I update these figures, the Inkscape figure will be updated as well.
I am quite sure that doesn't work any more after slicing, it only 'remembers' the transformations/changes you made to the figure itself.
Are there any more suggestions on an 'automatic' version of this? Or maybe someone knows of an extension that would fit my needs:)?
The use of Blender (which I tried for a short period and didn't understand..) would make it manipulative and non-'automatic', so I would like to do everything in one program, e.g. Inkscape.
Re: 2D to 3D?
Hi.
How was your original plots generated?
By having your 'generating program' (Mathlab?) write the axis and 'main' plot to different files it is possible to write a script to do the rotation, skew and offsets.
This is not quite correct, if you link to the images instead of embed the changes will be 'remembered', the trick is to do the slicing before importing the parts into Inkscape.
RGDS
Ragnar
How was your original plots generated?
By having your 'generating program' (Mathlab?) write the axis and 'main' plot to different files it is possible to write a script to do the rotation, skew and offsets.
I am quite sure that doesn't work any more after slicing, it only 'remembers' the transformations/changes you made to the figure itself.
This is not quite correct, if you link to the images instead of embed the changes will be 'remembered', the trick is to do the slicing before importing the parts into Inkscape.
RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
-
- Posts: 8
- Joined: Thu May 15, 2014 9:43 pm
Re: 2D to 3D?
Hey Ragnar,
The original plots are made in ODV (Ocean Data Viewer) or Matlab.
I could indeed export the different parts of the graph as different files, then Inkscape can remember it and the linking works.
I think all the ideas in this topic gave me a good start to play around a bit more.
Still I think using Powerpoint or LibreOffice Impress does things really easy:
From a random 2D transect I found on the web:

to

in a few minutes (and never done it before). This would help me, it is however manipulative as well, but maybe I have to live with that
--- Not sure why I can't post in-text pictures/figures like you: The links of the images are correct?
The original plots are made in ODV (Ocean Data Viewer) or Matlab.
I could indeed export the different parts of the graph as different files, then Inkscape can remember it and the linking works.
I think all the ideas in this topic gave me a good start to play around a bit more.
Still I think using Powerpoint or LibreOffice Impress does things really easy:
From a random 2D transect I found on the web:

to
in a few minutes (and never done it before). This would help me, it is however manipulative as well, but maybe I have to live with that

--- Not sure why I can't post in-text pictures/figures like you: The links of the images are correct?
Re: 2D to 3D?
Hi.
The www part needs to be changed to dl in the url-s from dropbox for displaying them right.
That fancy colours are achieved with raster images on the original file even if the plot itself is vector, so you really might consider to use blender instead.
-
- Posts: 8
- Joined: Thu May 15, 2014 9:43 pm
Re: 2D to 3D?
Dear Lazur,
Thank you for fixing my figures:)
I do not understand your last sentence:
You suggest that I should use Blender, but what do you mean with the rest of the sentence?
Thank you for fixing my figures:)
I do not understand your last sentence:
That fancy colours are achieved with raster images on the original file even if the plot itself is vector, so you really might consider to use blender instead.
You suggest that I should use Blender, but what do you mean with the rest of the sentence?
Re: 2D to 3D?
The gradient part from matlab is a generated raster image.
I don't know how exaclty you export your figure later to be used in inkscape, but even if you manage to export as an svg, those colours are made up by embedded raster images.
Which may limit how large you can scale it up, without being pixelated.
I don't know how exaclty you export your figure later to be used in inkscape, but even if you manage to export as an svg, those colours are made up by embedded raster images.
Which may limit how large you can scale it up, without being pixelated.
-
- Posts: 8
- Joined: Thu May 15, 2014 9:43 pm
Re: 2D to 3D?
Ah OK, thank you for your explanation, I think I understand it better now.