gotcha

Author Topic: I would like to know some general mathematics behind a shape, curve, node, shade  (Read 1175 times)

January 11, 2018, 04:21:06 PM
Read 1175 times

MrAccident

  • Jr. Member

  • Offline
  • ***

  • 10
Mostly about their complexity?
Specifically - the first question I thought of - is whether the basic shapes have less complexity - rather than if I'll turn them to paths. Meaning - that they require less information, and lighter on the program\rendering.
So if I'll create a very complex "painting" - maybe I should try to use most basic shapes - to the highest degree I can?
A more specific question - if indeed the basic shapes are simpler -- is the simplicity kept with complex manipulation of the shapes - without turning them into paths; I mean such that they turn to some abstract forms. And if so - does it have to do with the manipulations being sort-of or exactly - as fractal equations etc; while for a special path - each part of the shape\node - requires its own specific information etc?
And is there a list somewhere - of the different complexities of kinds of objects\filters\effects etc? So I'll be able to use the program in the smartest way.
  • InkScape: 0.48.3.1 r9886
  • OS: Puppy-Linux: Slacko 5.7.0

January 11, 2018, 06:35:46 PM
Reply #1

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
Hi.

Maybe we are getting closer from your other topic?

A 4 noded, filled path is described in a larger code than a rectangle showing the same fill, but a 2-noded path with a straight segment with a stroke and no fill takes even less space in your svg. Personally I rather use paths and rather filled paths than those with strokes only as transformations may lead to unexpected rendering within inkscape and/or saving as pdf/opening the svg with a renderer may lead to rendering issues.
Does it really boost/crawl the performance?
As in the previous example in th eother topic linked, this one crawls.
Objects are pretty simple, four noded paths each, but every single one has its own style attributes defined -with the use of cloning it could have been much "relyable" in the sence of moving those objects inside that file.
Contrary the next example which can hardly render but which is just using clones all the way.

Fractal geometry is special needs special precautions in inkscape out of limitations. They are infinite, so if you wanted to draw one it would take close to an infinite number of objects. Fractals drawn with inkscape -or with any vector drawing tools- are a rare breed.
Filters are somewhat have a similar problem. That fractal example has alot of objects within the svg codes stored, while filters should only render on screen but not necessarily bloat the svg codes. Still, the filters detail level get exponentially more with zooming in.
A turbulence noise is half a line in the svg codes yet it'd generate an infinite amount of pixels rendered on screen if you zoom in.
Like that sledgehammer was the largest I could screen capture only, see the failed thumbnail generating by openclipart (they use inkscape 0.91 to render a 2400 px/2400 px sized image).


Still I'm not sure what kind of complex painting are you after. Showed you all the extremities I could think of, with svg examples that you can test. But it seems it's no use? Maybe we could suggest methods instead to draw something rather than this technical talk if there was a design goal.

January 12, 2018, 09:15:57 AM
Reply #2

MrAccident

  • Jr. Member

  • Offline
  • ***

  • 10
Hi Lazur.
Yeah, I always start from a general understanding, including of what to ask, and improve.

About fractals - I meant fractal shapes, not fractals of\by an infinite equation (if it makes sense); so it can be finite and very limited. I meant that for instance - a polygon shape can be turned to a very abstract shape, but the initial math\numbers etc that created it - probably can be preserved, and then a single general manipulation\function - can be performed on it - every time it is rendered. I'm not an expert in any of those areas, just learning all of them, and still making progress. But I think that that could make the final design - much more efficient; and that may be the future; and in-fact is used in some animations, including 3D movies, maybe games etc.

About filters - do you know of huge differences between the different ones - in terms of complexity? For instance - even a drop shadow (if such exists, like in PhotoShop) - is complex; or are there lightweight filters?

Your examples actually help me alot.
  • InkScape: 0.48.3.1 r9886
  • OS: Puppy-Linux: Slacko 5.7.0

January 12, 2018, 10:29:56 AM
Reply #3

Lazur

  • IC Mentor

  • Offline
  • ******
  • Inkscape Filters Wizard

  • 1,154
  • Gender
    Male

    Male
Filters are chained up filter primitives describing a method how to alter the pixels rendered inside a filtered area.
There is no dropshadow filter (primitive) as per se, yet there exist a custom filter built up from blurring and offsetting in the filters menu.
Blurring is one of the most resource-heavy filter primitives. As a result, rendering blurring ended up the only part of inkscape using the gpu.
In general those filter primitives are heavy as well that use the background image as an input. Including custom blending modes -better avoid using them I'd suggest.

There are differences of complexity between filters; the more complex they are the more rendering resources they need usually.
Made this topic with alot of custom filters packed in, available with svg sources.

January 12, 2018, 10:59:41 AM
Reply #4

MrAccident

  • Jr. Member

  • Offline
  • ***

  • 10
  • InkScape: 0.48.3.1 r9886
  • OS: Puppy-Linux: Slacko 5.7.0

January 14, 2018, 06:15:10 AM
Reply #5

brynn

  • Administrator

  • Offline
  • ******

  • 3,941
  • Gender
    Female

    Female
    • Inkscape Community
Lazur is probably the expert here.  But just in case, I'll link you to a tutorial I wrote, which gives tips to either avoid performance issue, or to keep working after they appear.

https://forum.inkscapecommunity.com/index.php?action=articles;sa=view;article=35

After a certain point....say for example, you have thousands and thousands of nodes, there's nothing you can do short of upgrading your RAM.  But up until you reach the point of utter impatience, there are some things you can do to help.

  • Inkscape version 0.92.3
  • Windows 7 Pro, 64-bit
Inkscape Tutorials (and manuals)                      Inkscape Community Gallery                        Inkscape for Cutting Design                     



"Be ashamed to die until you have won some victory for humanity" - Horace Mann                       

January 14, 2018, 10:16:34 AM
Reply #6

MrAccident

  • Jr. Member

  • Offline
  • ***

  • 10
That article definitely contains information I need to know.
Thank you.
  • InkScape: 0.48.3.1 r9886
  • OS: Puppy-Linux: Slacko 5.7.0