当前位置:网站首页>What is SVG?

What is SVG?

2020-11-08 12:36:00 micemic

svg What is it ?

 

1 The main points of

The main points of 1:svg And jpg/png The purpose of the format is completely different , Can't be compared with , No comparability , There is no substitute for each other .

The main points of 2: In daily life , We take pictures and videos of natural scenes with our cameras , You can and can only use jpg/png/mp4 And so on , Unavailable svg Format store . In the natural scene , There is no definite mathematical function between pixels . We call natural scenes images , It can only be described in pixels , Cannot be described by mathematical functions .

The main points of 3:svg For artificial design ( Special emphasis on artificial design , It's not natural ) The point of 、 Line 、 A figure made up of faces , These graphs can be expressed by mathematical functions .svg Not suitable for describing and expressing natural scenes .

Concept

characteristic

Generator

Describe the method

File format

Images

There is no definite mathematical function between pixels

natural

Pixel by pixel

jpg/png/mp4 etc.

graphics

There is a definite mathematical function relationship between points

artificial

Mathematical functions

svg

 

2 svg Illustrate with examples

Suppose you want to design an icon with beautiful lines , By the ellipse 、 Hyperbola and parabola make up .

Suppose this icon is very large , It's made up of a trillion dots .

 

We can describe this icon with the following elements :

S1: Elliptic equation : Long axis length , Length of stub shaft ,x The scope of the , line color .

S2: Hyperbolic function or equation :x The scope of the , line color

S3: A parabolic function or equation :x The scope of the , line color

 

To describe the above elements, you need to 256 byte , With this 256 byte , Software will be based on x Draw each curve point by point , Finally, a beautiful icon of a trillion dots !

 

imagine , If this icon is used jpg/png To draw , How much data will be consumed .

 

Conclusion

Conclusion 1:svg Only for artificial graphics , These graphs can be expressed in mathematical functions , These mathematical functions can be expressed with very little data . The ultimate goal : It's complicated to express with very little data 、 Beautiful graphics .

Conclusion 2: The natural scene ( Images ) There is no correlation between the points in , It can't be expressed in mathematical functions , It can only be expressed in pixels ,jpg/png/mp4 It is suitable for expressing natural scenes ( Images ).

 

in addition , Be sure to distinguish the two concepts of figure and image .

Graphics are designed by man , It can be expressed by mathematical functions ,svg For this purpose .

Images are natural , Can't be expressed in mathematical functions ,jpg/png/mp4 For this purpose .

版权声明
本文为[micemic]所创,转载请带上原文链接,感谢