I have a layer in GeoServer which opens when default style like "polygon" is selected in the publishing menu
Layer opening with default style
but when I change its style in WMS Settings, for which I have created a new style by importing the SLD of same dateset from QGIS,
it shows the error like,
ERROR: invalid input syntax for type double precision
and the layer does not open.
error with new SLD
However while Validating the imported SLD, no errors were encountered.
validation of New SLD
The SLD used is as follows:
<StyledLayerDescriptor xmlns="http://www.opengis.net/sld" xmlns:se="http://www.opengis.net/se" xmlns:ogc="http://www.opengis.net/ogc" xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.1.0/StyledLayerDescriptor.xsd" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<NamedLayer>
<se:Name>rainfall_forecast</se:Name>
<UserStyle>
<se:Name>rainfall_forecast</se:Name>
<se:FeatureTypeStyle>
<se:Rule>
<se:Name>0 - 10</se:Name>
<se:Description>
<se:Title>0 - 10</se:Title>
</se:Description>
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:Or>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>rainfall</ogc:PropertyName>
<ogc:Literal></ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsNull>
<ogc:PropertyName>rainfall</ogc:PropertyName>
</ogc:PropertyIsNull>
</ogc:Or>
</ogc:Filter>
<se:PolygonSymbolizer>
<se:Fill>
<se:SvgParameter name="fill">#440154</se:SvgParameter>
</se:Fill>
<se:Stroke>
<se:SvgParameter name="stroke">#232323</se:SvgParameter>
<se:SvgParameter name="stroke-width">1</se:SvgParameter>
<se:SvgParameter name="stroke-linejoin">bevel</se:SvgParameter>
</se:Stroke>
</se:PolygonSymbolizer>
</se:Rule>
<se:Rule>
<se:Name>11 - 20</se:Name>
<se:Description>
<se:Title>11 - 20</se:Title>
</se:Description>
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:Or>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>rainfall</ogc:PropertyName>
<ogc:Literal></ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsNull>
<ogc:PropertyName>rainfall</ogc:PropertyName>
</ogc:PropertyIsNull>
</ogc:Or>
</ogc:Filter>
<se:PolygonSymbolizer>
<se:Fill>
<se:SvgParameter name="fill">#24868e</se:SvgParameter>
</se:Fill>
<se:Stroke>
<se:SvgParameter name="stroke">#232323</se:SvgParameter>
<se:SvgParameter name="stroke-width">1</se:SvgParameter>
<se:SvgParameter name="stroke-linejoin">bevel</se:SvgParameter>
</se:Stroke>
</se:PolygonSymbolizer>
</se:Rule>
<se:Rule>
<se:Name>21 - 30</se:Name>
<se:Description>
<se:Title>21 - 30</se:Title>
</se:Description>
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:Or>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>rainfall</ogc:PropertyName>
<ogc:Literal></ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsNull>
<ogc:PropertyName>rainfall</ogc:PropertyName>
</ogc:PropertyIsNull>
</ogc:Or>
</ogc:Filter>
<se:PolygonSymbolizer>
<se:Fill>
<se:SvgParameter name="fill">#5dc962</se:SvgParameter>
</se:Fill>
<se:Stroke>
<se:SvgParameter name="stroke">#232323</se:SvgParameter>
<se:SvgParameter name="stroke-width">1</se:SvgParameter>
<se:SvgParameter name="stroke-linejoin">bevel</se:SvgParameter>
</se:Stroke>
</se:PolygonSymbolizer>
</se:Rule>
<se:Rule>
<se:Name>31 - 40</se:Name>
<se:Description>
<se:Title>31 - 40</se:Title>
</se:Description>
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:Or>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>rainfall</ogc:PropertyName>
<ogc:Literal></ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:PropertyIsNull>
<ogc:PropertyName>rainfall</ogc:PropertyName>
</ogc:PropertyIsNull>
</ogc:Or>
</ogc:Filter>
<se:PolygonSymbolizer>
<se:Fill>
<se:SvgParameter name="fill">#8fd744</se:SvgParameter>
</se:Fill>
<se:Stroke>
<se:SvgParameter name="stroke">#232323</se:SvgParameter>
<se:SvgParameter name="stroke-width">1</se:SvgParameter>
<se:SvgParameter name="stroke-linejoin">bevel</se:SvgParameter>
</se:Stroke>
</se:PolygonSymbolizer>
</se:Rule>
<se:Rule>
<se:Name>41 - 50</se:Name>
<se:Description>
<se:Title>41 - 50</se:Title>
</se:Description>
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>rainfall</ogc:PropertyName>
<ogc:Literal>50</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<se:PolygonSymbolizer>
<se:Fill>
<se:SvgParameter name="fill">#c7e120</se:SvgParameter>
</se:Fill>
<se:Stroke>
<se:SvgParameter name="stroke">#232323</se:SvgParameter>
<se:SvgParameter name="stroke-width">1</se:SvgParameter>
<se:SvgParameter name="stroke-linejoin">bevel</se:SvgParameter>
</se:Stroke>
</se:PolygonSymbolizer>
</se:Rule>
<se:Rule>
<se:Name>> 50</se:Name>
<se:Description>
<se:Title>> 50</se:Title>
</se:Description>
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>rainfall</ogc:PropertyName>
<ogc:Literal>55</ogc:Literal>
</ogc:PropertyIsEqualTo>
</ogc:Filter>
<se:PolygonSymbolizer>
<se:Fill>
<se:SvgParameter name="fill">#e4e419</se:SvgParameter>
</se:Fill>
<se:Stroke>
<se:SvgParameter name="stroke">#232323</se:SvgParameter>
<se:SvgParameter name="stroke-width">1</se:SvgParameter>
<se:SvgParameter name="stroke-linejoin">bevel</se:SvgParameter>
</se:Stroke>
</se:PolygonSymbolizer>
</se:Rule>
</se:FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
How to rectify this error.
Related
firstly, I'm very new to GNUPlot, so please forgive me if I might sound silly or say stupid things.
I have to visualise some 3D data. I firstly wanted to have something that just worked correctly.
Here it is an example:
It's a scatter plot, meaning that I have the list of all (x, y, z) values, which come from a given computation.
I was now wondering if there is a way to convert this plot into a surf-like one, but without having to create a grid-mesh, because actually, real plots are made up of many of these zones, contingent in space, but not necessarily in memory (i.e. there's not order in listing all points, as well as each patch has its own setup). In which case, creating a grid is not possible..
Here is the script I built up to now:
# Main window settings
MAINFONT = ""
WINDOWTITLE = "BRM (mesher)"
WSIZEW = 3040 # base: 1980
WSIZEH = 2080 # base: 1080
set term wxt \
size WSIZEW, WSIZEH \
position 50, 50 \
font MAINFONT title WINDOWTITLE
#
# commands taken from GNU demo folder
#
# unset hidden3d
# set parametric
set view 45, 45
set border linestyle 102 linewidth 2
# draws a grid in the XY plane (at the base)
# set style line 102 lc rgb "#d6d7d9" lt 0 lw 1
set grid back ls 102
#
# setting styles
#
LINETYP = 8
LINEWDT = 2
POINTTY = 7
POINTIN = 0
POINTSZ = 1
# "#AARRGGBB"
set style line 1 linecolor rgb "#B5000000" \
linetype LINETYP linewidth LINEWDT \
pointtype POINTTY pointinterval POINTIN pointsize POINTSZ
set style line 2 linecolor rgb "#B5EEEEEE" \
linetype LINETYP linewidth LINEWDT \
pointtype POINTTY pointinterval POINTIN pointsize POINTSZ
set style data points
# #
# # LEGEND (related)
# #
# LEGENDTITLE = "brm"
# set key nobox \
# title LEGENDTITLE
#
# Annotation: title and labels
#
FIGURETITLE = "Bispectrum (MESHER)"
XLABEL = "f_1"
YLABEL = "f_2"
set title FIGURETITLE
set xlabel XLABEL
set ylabel YLABEL
# ??
set ticslevel 0.1
#
# RANGES
#
_xrange = 0
_yrange = 0
_xrangev_min = -0.58
_xrangev_max = 0.58
if (_xrange == 0) \
set autoscale x; \
else \
set xrange [_xrangev_min : _xrangev_max]
_yrangev_min = -0.58
_yrangev_max = 0.58
if (_yrange == 0) \
set autoscale y; \
else \
set yrange [_yrangev_min : _yrangev_max]
# by default, always autoscale Z axis
set autoscale z
#
# PALETTE (???)
#
set palette defined
#
# DATA file - ACTUAL PLOTTING (end of script)
#
DATAFILE = "brm_gnu.dat"
splot DATAFILE linestyle 1
set terminal png transparent \
size WSIZEW, WSIZEH \
truecolor enhanced
set out 'brm_gnu.png'
splot DATAFILE linestyle 2
Data in file brm_gnu.dat is layed down like this:
-0.925000000000000 -0.925000000000000 -1.112830727291687E-010
-0.925000000000000 -0.906500000000000 -1.233145093750881E-010
-0.925000000000000 -0.888000000000000 -1.366284414075596E-010
-0.925000000000000 -0.869500000000000 -1.519484378717266E-010
-0.925000000000000 -0.851000000000000 -1.689727146344101E-010
-0.925000000000000 -0.832500000000000 -1.886477866098199E-010
-0.925000000000000 -0.814000000000000 -2.106127410033206E-010
-0.925000000000000 -0.795500000000000 -2.361154837990765E-010
-0.925000000000000 -0.777000000000000 -2.647322799551845E-010
-0.925000000000000 -0.758500000000000 -2.981225082072651E-010
-0.925000000000000 -0.740000000000000 -3.358043924792572E-010
-0.925000000000000 -0.721500000000000 -3.800054710485629E-010
-0.925000000000000 -0.703000000000000 -4.302096737531581E-010
-0.925000000000000 -0.684500000000000 -4.894396712358350E-010
-0.925000000000000 -0.666000000000000 -5.572088806295344E-010
-0.925000000000000 -0.647500000000001 -6.376713565360164E-010
-0.925000000000000 -0.629000000000001 -7.305164855939753E-010
-0.925000000000000 -0.610500000000001 -8.415428103502650E-010
-0.925000000000000 -0.592000000000001 -9.709330437110598E-010
-0.925000000000000 -0.573500000000001 -1.126945044480171E-009
-0.925000000000000 -0.555000000000001 -1.310931309425567E-009
-0.925000000000000 -0.536500000000001 -1.534975141884201E-009
-0.925000000000000 -0.518000000000001 -1.803055173016286E-009
-0.925000000000000 -0.499500000000001 -2.133544704946095E-009
-0.925000000000000 -0.481000000000001 -2.536285945770245E-009
-0.925000000000000 -0.462500000000001 -3.040837628811161E-009
-0.925000000000000 -0.444000000000001 -3.670506613697746E-009
-0.925000000000000 -0.425500000000001 -4.477002392036607E-009
-0.925000000000000 -0.407000000000001 -5.516399793216453E-009
-0.925000000000000 -0.388500000000001 -6.890678221135726E-009
-0.925000000000000 -0.370000000000001 -8.742275516296416E-009
-0.925000000000000 -0.351500000000001 -1.130228554007822E-008
-0.925000000000000 -0.333000000000001 -1.493876996861222E-008
-0.925000000000000 -0.314500000000001 -2.008105455788527E-008
-0.925000000000000 -0.296000000000001 -2.639740388136111E-008
-0.925000000000000 -0.277500000000001 -2.495551205522123E-008
-0.925000000000000 -0.259000000000001 1.217373182500029E-008
-0.925000000000000 -0.240500000000001 4.002042521882181E-008
-0.925000000000000 -0.222000000000001 3.920606423887810E-008
-0.925000000000000 -0.203500000000001 3.394892837099711E-008
-0.925000000000000 -0.185000000000001 2.982629548434422E-008
-0.925000000000000 -0.166500000000001 2.650822114502139E-008
-0.925000000000000 -0.148000000000001 2.419113779933117E-008
-0.925000000000000 -0.129500000000001 2.199076752962076E-008
-0.925000000000000 -0.111000000000001 2.033869550352628E-008
-0.925000000000000 -9.250000000000064E-002 1.831654441535893E-008
-0.925000000000000 -7.400000000000063E-002 1.660422884667210E-008
-0.925000000000000 -5.550000000000063E-002 1.405821421353012E-008
-0.925000000000000 -3.700000000000063E-002 1.162135856322721E-008
-0.925000000000000 -1.850000000000063E-002 7.711497131970931E-009
-0.925000000000000 -6.314393452555578E-016 3.612797228830624E-009
-0.925000000000000 1.849999999999937E-002 9.044608397276898E-009
-0.925000000000000 3.699999999999937E-002 1.517231304642434E-008
-0.925000000000000 5.549999999999937E-002 2.100479548010471E-008
-0.925000000000000 7.399999999999937E-002 2.794273124567097E-008
-0.925000000000000 9.249999999999937E-002 3.515439985695759E-008
-0.925000000000000 0.110999999999999 4.417517701787027E-008
-0.925000000000000 0.129499999999999 5.446047844096278E-008
-0.925000000000000 0.147999999999999 6.804953706846881E-008
-0.925000000000000 0.166499999999999 8.514167966829595E-008
-0.925000000000000 0.184999999999999 1.092469464956259E-007
-0.925000000000000 0.203499999999999 1.424166963507360E-007
-0.925000000000000 0.221999999999999 1.886672091873319E-007
-0.925000000000000 0.240499999999999 2.226918466600739E-007
-0.925000000000000 0.258999999999999 8.361467589272240E-008
-0.925000000000000 0.277499999999999 -1.744810743977760E-007
-0.925000000000000 0.295999999999999 -2.169414767863524E-007
-0.925000000000000 0.314499999999999 -1.918417016294112E-007
-0.925000000000000 0.332999999999999 -1.660457713844593E-007
-0.925000000000000 0.351499999999999 -1.463673267513782E-007
-0.925000000000000 0.369999999999999 -1.324561338505409E-007
-0.925000000000000 0.388499999999999 -1.224425506157808E-007
-0.925000000000000 0.406999999999999 -1.156187000982741E-007
-0.925000000000000 0.425499999999999 -1.110329121612473E-007
-0.925000000000000 0.443999999999999 -1.085133392168845E-007
-0.925000000000000 0.462499999999999 -1.076295481079459E-007
-0.925000000000000 0.480999999999999 -1.085133392168845E-007
-0.925000000000000 0.499499999999999 -1.110329121612472E-007
-0.925000000000000 0.517999999999999 -1.156187000982739E-007
-0.925000000000000 0.536499999999999 -1.224425506157803E-007
-0.925000000000000 0.554999999999999 -1.324561338505402E-007
-0.925000000000000 0.573499999999999 -1.463673267513768E-007
-0.925000000000000 0.591999999999999 -1.660457713844573E-007
-0.925000000000000 0.610499999999999 -1.918417016294087E-007
-0.925000000000000 0.628999999999999 -2.169414767863508E-007
-0.925000000000000 0.647499999999999 -1.744810743977867E-007
-0.925000000000000 0.665999999999999 8.361467589269764E-008
-0.925000000000000 0.684499999999999 2.226918466600726E-007
-0.925000000000000 0.702999999999999 1.886672091873358E-007
-0.925000000000000 0.721499999999999 1.424166963507389E-007
-0.925000000000000 0.739999999999999 1.092469464956279E-007
-0.925000000000000 0.758499999999999 8.514167966829721E-008
-0.925000000000000 0.776999999999999 6.804953706846961E-008
-0.925000000000000 0.795499999999999 5.446047844096326E-008
-0.925000000000000 0.813999999999999 4.417517701787055E-008
-0.925000000000000 0.832499999999999 3.515439985695774E-008
-0.925000000000000 0.850999999999999 2.794273124567102E-008
-0.925000000000000 0.869499999999999 2.100479548010464E-008
-0.925000000000000 0.887999999999999 1.517231304642419E-008
-0.925000000000000 0.906499999999999 9.044608397276874E-009
-0.925000000000000 0.924999999999999 3.612797228830709E-009
-0.888000000000000 -0.925000000000000 -1.366284414075596E-010
-0.888000000000000 -0.906500000000000 -1.514554825885140E-010
-0.888000000000000 -0.888000000000000 -1.678715585166733E-010
-0.888000000000000 -0.869500000000000 -1.867669141753174E-010
-0.888000000000000 -0.851000000000000 -2.077756527881272E-010
-0.888000000000000 -0.832500000000000 -2.320637715170312E-010
-0.888000000000000 -0.814000000000000 -2.591939133899776E-010
-0.888000000000000 -0.795500000000000 -2.907054359991271E-010
-0.888000000000000 -0.777000000000000 -3.260854042965641E-010
-0.888000000000000 -0.758500000000000 -3.673837700039050E-010
-0.888000000000000 -0.740000000000000 -4.140185705201067E-010
-0.888000000000000 -0.721500000000000 -4.687460835720848E-010
-0.888000000000000 -0.703000000000000 -5.309456540028089E-010
-0.888000000000000 -0.684500000000000 -6.043640295947556E-010
-0.888000000000000 -0.666000000000000 -6.884223308909101E-010
-0.888000000000000 -0.647500000000001 -7.882796678741693E-010
-0.888000000000000 -0.629000000000001 -9.035829327128297E-010
-0.888000000000000 -0.610500000000001 -1.041548837634559E-009
-0.888000000000000 -0.592000000000001 -1.202448012416946E-009
-0.888000000000000 -0.573500000000001 -1.396581641103813E-009
-0.888000000000000 -0.555000000000001 -1.625692034292117E-009
-0.888000000000000 -0.536500000000001 -1.904889699074367E-009
-0.888000000000000 -0.518000000000001 -2.239214737295571E-009
-0.888000000000000 -0.499500000000001 -2.651702965951379E-009
-0.888000000000000 -0.481000000000001 -3.154754671938524E-009
-0.888000000000000 -0.462500000000001 -3.785524790771094E-009
-0.888000000000000 -0.444000000000001 -4.573321099493714E-009
-0.888000000000000 -0.425500000000001 -5.583291834596760E-009
-0.888000000000000 -0.407000000000001 -6.885924678859094E-009
-0.888000000000000 -0.388500000000001 -8.609926607920218E-009
-0.888000000000000 -0.370000000000001 -1.093443224260467E-008
-0.888000000000000 -0.351500000000001 -1.415141660472406E-008
-0.888000000000000 -0.333000000000001 -1.872420023868949E-008
-0.888000000000000 -0.314500000000001 -2.519643739342348E-008
-0.888000000000000 -0.296000000000001 -3.315091047770025E-008
-0.888000000000000 -0.277500000000001 -3.133806906065347E-008
-0.888000000000000 -0.259000000000001 1.546718386380113E-008
-0.888000000000000 -0.240500000000001 5.061374436033968E-008
-0.888000000000000 -0.222000000000001 4.962933230441113E-008
-0.888000000000000 -0.203500000000001 4.303993129303609E-008
-0.888000000000000 -0.185000000000001 3.787728624524228E-008
-0.888000000000000 -0.166500000000001 3.373039604908384E-008
-0.888000000000000 -0.148000000000001 3.084627797750065E-008
-0.888000000000000 -0.129500000000001 2.810937227742075E-008
-0.888000000000000 -0.111000000000001 2.606548441463560E-008
-0.888000000000000 -9.250000000000064E-002 2.354964918053996E-008
-0.888000000000000 -7.400000000000063E-002 2.142508131358988E-008
-0.888000000000000 -5.550000000000063E-002 1.823209774441858E-008
-0.888000000000000 -3.700000000000063E-002 1.517231304642424E-008
-0.888000000000000 -1.850000000000063E-002 1.021290092645047E-008
-0.888000000000000 -6.314393452555578E-016 4.996516315440040E-009
-0.888000000000000 1.849999999999937E-002 1.204686441977831E-008
-0.888000000000000 3.699999999999937E-002 2.003725247337349E-008
-0.888000000000000 5.549999999999937E-002 2.770656912576066E-008
-0.888000000000000 7.399999999999937E-002 3.686853319008584E-008
-0.888000000000000 9.249999999999937E-002 4.647057591600724E-008
-0.888000000000000 0.110999999999999 5.852674022159808E-008
-0.888000000000000 0.129499999999999 7.237217172770839E-008
-0.888000000000000 0.147999999999999 9.072779247103859E-008
-0.888000000000000 0.166499999999999 1.139536289449970E-007
-0.888000000000000 0.184999999999999 1.468272034445875E-007
-0.888000000000000 0.203499999999999 1.923234269198452E-007
-0.888000000000000 0.221999999999999 2.561821950532344E-007
-0.888000000000000 0.240499999999999 3.045967590943703E-007
-0.888000000000000 0.258999999999999 1.171993595810555E-007
-0.888000000000000 0.277499999999999 -2.378521699660832E-007
-0.888000000000000 0.295999999999999 -2.991990241636433E-007
-0.888000000000000 0.314499999999999 -2.667602282068009E-007
-0.888000000000000 0.332999999999999 -2.327707439729019E-007
-0.888000000000000 0.351499999999999 -2.069250337782313E-007
-0.888000000000000 0.369999999999999 -1.889997417787384E-007
-0.888000000000000 0.388499999999999 -1.764722762883600E-007
-0.888000000000000 0.406999999999999 -1.685374934037391E-007
-0.888000000000000 0.425499999999999 -1.638989791992446E-007
-0.888000000000000 0.443999999999999 -1.625314556369960E-007
-0.888000000000000 0.462499999999999 -1.638989791992444E-007
-0.888000000000000 0.480999999999999 -1.685374934037387E-007
-0.888000000000000 0.499499999999999 -1.764722762883594E-007
-0.888000000000000 0.517999999999999 -1.889997417787376E-007
-0.888000000000000 0.536499999999999 -2.069250337782301E-007
-0.888000000000000 0.554999999999999 -2.327707439728999E-007
-0.888000000000000 0.573499999999999 -2.667602282067980E-007
-0.888000000000000 0.591999999999999 -2.991990241636416E-007
-0.888000000000000 0.610499999999999 -2.378521699660962E-007
-0.888000000000000 0.628999999999999 1.171993595810264E-007
-0.888000000000000 0.647499999999999 3.045967590943685E-007
-0.888000000000000 0.665999999999999 2.561821950532387E-007
-0.888000000000000 0.684499999999999 1.923234269198487E-007
-0.888000000000000 0.702999999999999 1.468272034445898E-007
-0.888000000000000 0.721499999999999 1.139536289449986E-007
-0.888000000000000 0.739999999999999 9.072779247103978E-008
-0.888000000000000 0.758499999999999 7.237217172770904E-008
-0.888000000000000 0.776999999999999 5.852674022159847E-008
-0.888000000000000 0.795499999999999 4.647057591600741E-008
-0.888000000000000 0.813999999999999 3.686853319008582E-008
-0.888000000000000 0.832499999999999 2.770656912576058E-008
-0.888000000000000 0.850999999999999 2.003725247337335E-008
-0.888000000000000 0.869499999999999 1.204686441977828E-008
-0.888000000000000 0.887999999999999 4.996516315440152E-009
-0.888000000000000 0.906499999999999 1.021290092645066E-008
-0.888000000000000 0.924999999999999 1.517231304642449E-008
-0.906500000000000 -0.925000000000000 -1.233145093750881E-010
-0.906500000000000 -0.906500000000000 -1.366712162455961E-010
-0.906500000000000 -0.888000000000000 -1.514554825885140E-010
-0.906500000000000 -0.869500000000000 -1.684698988679970E-010
-0.906500000000000 -0.851000000000000 -1.873821383985311E-010
-0.906500000000000 -0.832500000000000 -2.092427346051062E-010
-0.906500000000000 -0.814000000000000 -2.336543459977473E-010
-0.906500000000000 -0.795500000000000 -2.620029506471153E-010
-0.906500000000000 -0.777000000000000 -2.938222817540006E-010
-0.906500000000000 -0.758500000000000 -3.309566693801141E-010
-0.906500000000000 -0.740000000000000 -3.728765161227582E-010
-0.906500000000000 -0.721500000000000 -4.220596246022149E-010
-0.906500000000000 -0.703000000000000 -4.779398944083059E-010
-0.906500000000000 -0.684500000000000 -5.438825499738923E-010
-0.906500000000000 -0.666000000000000 -6.193566049239658E-010
-0.906500000000000 -0.647500000000001 -7.089913437241107E-010
-0.906500000000000 -0.629000000000001 -8.124550216954241E-010
-0.906500000000000 -0.610500000000001 -9.362163645406903E-010
-0.906500000000000 -0.592000000000001 -1.080498172760888E-009
-0.906500000000000 -0.573500000000001 -1.254523323649140E-009
-0.906500000000000 -0.555000000000001 -1.459826376314463E-009
-0.906500000000000 -0.536500000000001 -1.709919380579901E-009
-0.906500000000000 -0.518000000000001 -2.009279152148843E-009
-0.906500000000000 -0.499500000000001 -2.378478052394948E-009
-0.906500000000000 -0.481000000000001 -2.828561117094100E-009
-0.906500000000000 -0.462500000000001 -3.392667355731829E-009
-0.906500000000000 -0.444000000000001 -4.096927601250477E-009
-0.906500000000000 -0.425500000000001 -4.999381363828435E-009
-0.906500000000000 -0.407000000000001 -6.162888260319948E-009
-0.906500000000000 -0.388500000000001 -7.702010777696916E-009
-0.906500000000000 -0.370000000000001 -9.776462968777032E-009
-0.906500000000000 -0.351500000000001 -1.264599184476242E-008
-0.906500000000000 -0.333000000000001 -1.672350388985956E-008
-0.906500000000000 -0.314500000000001 -2.249212029278521E-008
-0.906500000000000 -0.296000000000001 -2.957989097539718E-008
-0.906500000000000 -0.277500000000001 -2.796384756075452E-008
-0.906500000000000 -0.259000000000001 1.371887680503458E-008
-0.906500000000000 -0.240500000000001 4.500053541945885E-008
-0.906500000000000 -0.222000000000001 4.410536409817017E-008
-0.906500000000000 -0.203500000000001 3.822038841662931E-008
-0.906500000000000 -0.185000000000001 3.360739075021546E-008
-0.906500000000000 -0.166500000000001 2.989833461734862E-008
-0.906500000000000 -0.148000000000001 2.731337564207566E-008
-0.906500000000000 -0.129500000000001 2.485956140414542E-008
-0.906500000000000 -0.111000000000001 2.302206300210600E-008
-0.906500000000000 -9.250000000000064E-002 2.076683042691665E-008
-0.906500000000000 -7.400000000000063E-002 1.885973769795809E-008
-0.906500000000000 -5.550000000000063E-002 1.600921909170784E-008
-0.906500000000000 -3.700000000000063E-002 1.327938872744156E-008
-0.906500000000000 -1.850000000000063E-002 8.877473815630514E-009
-0.906500000000000 -6.314393452555578E-016 4.255507953928457E-009
-0.906500000000000 1.849999999999937E-002 1.044166431933323E-008
-0.906500000000000 3.699999999999937E-002 1.743614564704666E-008
-0.906500000000000 5.549999999999937E-002 2.412148830393200E-008
-0.906500000000000 7.399999999999937E-002 3.209052259334402E-008
-0.906500000000000 9.249999999999937E-002 4.040794806557133E-008
-0.906500000000000 0.110999999999999 5.083090912922838E-008
-0.906500000000000 0.129499999999999 6.275741062996620E-008
-0.906500000000000 0.147999999999999 7.854088457460013E-008
-0.906500000000000 0.166499999999999 9.845150853016995E-008
-0.906500000000000 0.184999999999999 1.265800089781315E-007
-0.906500000000000 0.203499999999999 1.653939929314344E-007
-0.906500000000000 0.221999999999999 2.196862110699713E-007
-0.906500000000000 0.240499999999999 2.602144086867102E-007
-0.906500000000000 0.258999999999999 9.884958131045721E-008
-0.906500000000000 0.277499999999999 -2.035802542405856E-007
-0.906500000000000 0.295999999999999 -2.545269003492000E-007
-0.906500000000000 0.314499999999999 -2.259593091092582E-007
-0.906500000000000 0.332999999999999 -1.963318006679911E-007
-0.906500000000000 0.351499999999999 -1.737574136603818E-007
-0.906500000000000 0.369999999999999 -1.579312255221945E-007
-0.906500000000000 0.388499999999999 -1.466792948328887E-007
-0.906500000000000 0.406999999999999 -1.392395360328343E-007
-0.906500000000000 0.425499999999999 -1.344964799883919E-007
-0.906500000000000 0.443999999999999 -1.323297848028745E-007
-0.906500000000000 0.462499999999999 -1.322469414183294E-007
-0.906500000000000 0.480999999999999 -1.345321624991211E-007
-0.906500000000000 0.499499999999999 -1.390900220084392E-007
-0.906500000000000 0.517999999999999 -1.466735981468943E-007
-0.906500000000000 0.536499999999999 -1.576717543811861E-007
-0.906500000000000 0.554999999999999 -1.737028723144627E-007
-0.906500000000000 0.573499999999999 -1.958655577255762E-007
-0.906500000000000 0.591999999999999 -2.258266556659192E-007
-0.906500000000000 0.610499999999999 -2.536813208860895E-007
-0.906500000000000 0.628999999999999 -2.033996127677433E-007
-0.906500000000000 0.647499999999999 9.839891803808796E-008
-0.906500000000000 0.665999999999999 2.598892689170532E-007
-0.906500000000000 0.684499999999999 2.183239868389179E-007
-0.906500000000000 0.702999999999999 1.651091175348573E-007
-0.906500000000000 0.721499999999999 1.255105409220265E-007
-0.906500000000000 0.739999999999999 9.821654436346623E-008
-0.906500000000000 0.758499999999999 7.762178553728138E-008
-0.906500000000000 0.776999999999999 6.254401541217292E-008
-0.906500000000000 0.795499999999999 4.997354948465678E-008
-0.906500000000000 0.813999999999999 4.020011324238698E-008
-0.906500000000000 0.832499999999999 3.124110268472883E-008
-0.906500000000000 0.850999999999999 2.390820741791080E-008
-0.906500000000000 0.869499999999999 1.655039280302377E-008
-0.906500000000000 0.887999999999999 1.021290092645050E-008
-0.906500000000000 0.906499999999999 9.561331090630669E-009
-0.906500000000000 0.924999999999999 9.044608397277014E-009
Thanks :)
PS: ANY suggestion/comment/critics not strictly related to the question, but that would improve my knowledge, is well accepted!
EDIT 1:
Here is an example of how I'd like the plot to look like instead:
You don't show nearly enough data to get a feel for what the full data set looks like. In the hope that it helps, here is an example of using set dgrid3d on a small number of points to produce a plot sort of like the one you show:
$DATA << EOD
-5.0 -5.0 0
-5.0 5.0 0
5.0 5.0 0
5.0 -5.0 0
0.0 0.0 0
-3.0 -2.0 8.e10
-1.0 2.0 6.e10
-2.0 -1.0 9.e10
2.0 2.0 5.e10
0.0 -3.0 8.e10
3.0 0.0 7.e10
EOD
set grid x y z
set grid vertical
set xyplane at 0
set dgrid3d 100,100 gauss kdensity 0.6, 0.6
splot $DATA with pm3d
Examples using amended data
Probably the best answer is to change your data format slightly so that each X value has its own block in the file. I.e. put a blank line between the section with X=-0.925 and the section with X=-0.888 and so on. That make the plot command very simple. However it seems there are some glitches in your data, maybe due to inconsistent sampling?
set hidden3d offset 0 # remove hidden lines
splot "DATA" with lines title "blank line between x slices"
A different way is to use dgrid3d as shown before. You must tailor the dgrid3d parameters and weighting scheme to your data. I cannot do that for you, you have to think about how you want each data point to contribute to the surface: How big is the neighborhood it affects? Is it a requirement that the surface pass exactly through each point? How smooth should the surface be? Etc...
Anyhow, here is a simple example using your amended data. The sample data pretty much consists of 100 samples for each x and 3 for each y so that's what we set as a grid. We ask for a spline fit through the points.
set dgrid3d 100,3 spline
set hidden3d
plot "DATA" with lines
I want to extract the ports for each device on the below:
index: 0
name: <alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_5__sink>
driver: <module-alsa-card.c>
flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 9037
volume: front-left: 65536 / 100% / 0,00 dB, front-right: 65536 / 100% / 0,00 dB
balance 0,00
base volume: 65536 / 100% / 0,00 dB
volume steps: 65537
muted: no
current latency: 0,00 ms
max request: 0 KiB
max rewind: 0 KiB
monitor source: 0
sample spec: s16le 2ch 48000Hz
channel map: front-left,front-right
Stereo
used by: 0
linked by: 0
configured latency: 0,00 ms; range is 0,50 .. 341,00 ms
card: 0 <alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic>
module: 7
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = ""
alsa.id = "HDMI3 (*)"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "5"
alsa.card = "0"
alsa.card_name = "sof-hda-dsp"
alsa.long_card_name = "DellInc.-Inspiron5490--0YMVR1"
alsa.driver_name = "snd_soc_skl_hda_dsp"
device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "02c8"
device.string = "hw:sofhdadsp,5"
device.buffering.buffer_size = "65472"
device.buffering.fragment_size = "16320"
device.access_mode = "mmap+timer"
device.profile.name = "HiFi: hw:sofhdadsp,5: sink"
device.profile.description = "HDMI3/DP3 Output"
alsa.mixer_device = "hw:sofhdadsp"
device.description = "sof-hda-dsp HDMI3/DP3 Output"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
[Out] HDMI3: HDMI3/DP3 Output (priority 700, latency offset 0 usec, available: no)
properties:
active port: <[Out] HDMI3>
index: 1
name: <alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_4__sink>
driver: <module-alsa-card.c>
flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 9036
volume: front-left: 65536 / 100% / 0,00 dB, front-right: 65536 / 100% / 0,00 dB
balance 0,00
base volume: 65536 / 100% / 0,00 dB
volume steps: 65537
muted: no
current latency: 0,00 ms
max request: 0 KiB
max rewind: 0 KiB
monitor source: 1
sample spec: s16le 2ch 48000Hz
channel map: front-left,front-right
Stereo
used by: 0
linked by: 0
configured latency: 0,00 ms; range is 0,50 .. 341,00 ms
card: 0 <alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic>
module: 7
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = ""
alsa.id = "HDMI2 (*)"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "4"
alsa.card = "0"
alsa.card_name = "sof-hda-dsp"
alsa.long_card_name = "DellInc.-Inspiron5490--0YMVR1"
alsa.driver_name = "snd_soc_skl_hda_dsp"
device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "02c8"
device.string = "hw:sofhdadsp,4"
device.buffering.buffer_size = "65472"
device.buffering.fragment_size = "16320"
device.access_mode = "mmap+timer"
device.profile.name = "HiFi: hw:sofhdadsp,4: sink"
device.profile.description = "HDMI2/DP2 Output"
alsa.mixer_device = "hw:sofhdadsp"
device.description = "sof-hda-dsp HDMI2/DP2 Output"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
[Out] HDMI2: HDMI2/DP2 Output (priority 600, latency offset 0 usec, available: no)
properties:
active port: <[Out] HDMI2>
index: 2
name: <alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp_3__sink>
driver: <module-alsa-card.c>
flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: SUSPENDED
suspend cause: IDLE
priority: 9035
volume: front-left: 65536 / 100% / 0,00 dB, front-right: 65536 / 100% / 0,00 dB
balance 0,00
base volume: 65536 / 100% / 0,00 dB
volume steps: 65537
muted: no
current latency: 0,00 ms
max request: 0 KiB
max rewind: 0 KiB
monitor source: 2
sample spec: s16le 2ch 48000Hz
channel map: front-left,front-right
Stereo
used by: 0
linked by: 0
configured latency: 0,00 ms; range is 0,50 .. 341,00 ms
card: 0 <alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic>
module: 7
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = ""
alsa.id = "HDMI1 (*)"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "3"
alsa.card = "0"
alsa.card_name = "sof-hda-dsp"
alsa.long_card_name = "DellInc.-Inspiron5490--0YMVR1"
alsa.driver_name = "snd_soc_skl_hda_dsp"
device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "02c8"
device.string = "hw:sofhdadsp,3"
device.buffering.buffer_size = "65472"
device.buffering.fragment_size = "16320"
device.access_mode = "mmap+timer"
device.profile.name = "HiFi: hw:sofhdadsp,3: sink"
device.profile.description = "HDMI1/DP1 Output"
alsa.mixer_device = "hw:sofhdadsp"
device.description = "sof-hda-dsp HDMI1/DP1 Output"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
[Out] HDMI1: HDMI1/DP1 Output (priority 500, latency offset 0 usec, available: yes)
properties:
device.product.name = "2460G5"
active port: <[Out] HDMI1>
* index: 3
name: <alsa_output.pci-0000_00_1f.3-platform-skl_hda_dsp_generic.HiFi__hw_sofhdadsp__sink>
driver: <module-alsa-card.c>
flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
state: RUNNING
suspend cause: (none)
priority: 9032
volume: front-left: 56752 / 87% / -3,75 dB, front-right: 56752 / 87% / -3,75 dB
balance 0,00
base volume: 65536 / 100% / 0,00 dB
volume steps: 65537
muted: no
current latency: 19,83 ms
max request: 4 KiB
max rewind: 4 KiB
monitor source: 3
sample spec: s16le 2ch 48000Hz
channel map: front-left,front-right
Stereo
used by: 1
linked by: 1
configured latency: 23,22 ms; range is 0,50 .. 341,00 ms
card: 0 <alsa_card.pci-0000_00_1f.3-platform-skl_hda_dsp_generic>
module: 7
properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = ""
alsa.id = "HDA Analog (*)"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "sof-hda-dsp"
alsa.long_card_name = "DellInc.-Inspiron5490--0YMVR1"
alsa.driver_name = "snd_soc_skl_hda_dsp"
device.bus_path = "pci-0000:00:1f.3-platform-skl_hda_dsp_generic"
sysfs.path = "/devices/pci0000:00/0000:00:1f.3/skl_hda_dsp_generic/sound/card0"
device.bus = "pci"
device.vendor.id = "8086"
device.vendor.name = "Intel Corporation"
device.product.id = "02c8"
device.string = "hw:sofhdadsp"
device.buffering.buffer_size = "65472"
device.buffering.fragment_size = "16320"
device.access_mode = "mmap+timer"
device.profile.name = "HiFi: hw:sofhdadsp: sink"
device.profile.description = "Speaker + Headphones"
alsa.mixer_device = "hw:sofhdadsp"
device.description = "sof-hda-dsp Speaker + Headphones"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card-pci"
ports:
[Out] Speaker: Speaker (priority 100, latency offset 0 usec, available: unknown)
properties:
[Out] Headphones: Headphones (priority 200, latency offset 0 usec, available: yes)
properties:
active port: <[Out] Headphones>
I can get each device index with:
pacmd list-sinks | awk '/index:/ {print $0}
or with:
pacmd list-sinks | grep -e index
which results in:
index: 0
index: 1
index: 2
* index: 3
How can I go beyond that and compose commands to extract something like the lines bellow?
index: 0
ports:
[Out] HDMI3: HDMI3/DP3 Output (priority 700, latency offset 0 usec, available: no)
index: 1
ports:
[Out] HDMI2: HDMI2/DP2 Output (priority 600, latency offset 0 usec, available: no)
index: 2
ports:
[Out] HDMI1: HDMI1/DP1 Output (priority 500, latency offset 0 usec, available: yes)
* index: 3
ports:
[Out] Speaker: Speaker (priority 100, latency offset 0 usec, available: unknown)
[Out] Headphones: Headphones (priority 200, latency offset 0 usec, available: yes)
pacmd list-sinks | awk '/index/ { print } /active port:/ { pnt=0 } /ports:/ { print;pnt=1 } pnt==1 && /\[Out\]/ { print }'
Print the index line, then when we see "ports:", set a variable pnt to 1, print the line and skip to the next line. When pnt is equal to one and the line contains "[Out]", print the line. When we see "active port:" reset the pnt variable back to 0.
I am using a Baytrail intel z3735 tablet. I am trying to run ubuntu 14.04/15.04 with linux kernel version 3.16/4.2.0. When I play an audio file the audio data is dumping to the audio sink but there is no audio coming from the speaker. I am able get the sound card detected as below...
sanj#sanj:~$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: bytrt5640 [byt-rt5640], device 0: Audio rt5640-aif1-0 []
Subdevices: 1/1
Subdevice #0: subdevice #0
sanj#sanj:~$
Audio Sink nodes :
sanj#sanj:~$ pactl list sinks
Sink #0
State: SUSPENDED
Name: alsa_output.platform-byt-rt5640.analog-stereo
Description: byt-rt5640 Analog Stereo
Driver: module-alsa-card.c
Sample Specification: s16le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 6
Mute: no
Volume: front-left: 99957 / 153% / 11.00 dB, front-right: 99957 / 153% / 11.00 dB
balance 0.00
Base Volume: 41350 / 63% / -12.00 dB
Monitor Source: alsa_output.platform-byt-rt5640.analog-stereo.monitor
Latency: 0 usec, configured 0 usec
Flags: HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY
Properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = ""
alsa.id = "Audio rt5640-aif1-0"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "byt-rt5640"
alsa.long_card_name = "byt-rt5640"
alsa.driver_name = "snd_soc_sst_byt_rt5640_mach"
device.bus_path = "platform-byt-rt5640"
sysfs.path = "/devices/platform/80860F28:00/byt-rt5640/sound/card0"
device.string = "hw:0"
device.buffering.buffer_size = "96000"
device.buffering.fragment_size = "48000"
device.access_mode = "mmap+timer"
device.profile.name = "analog-stereo"
device.profile.description = "Analog Stereo"
device.description = "byt-rt5640 Analog Stereo"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card"
Ports:
analog-output-speaker: Speakers (priority: 10000)
analog-output-headphones: Headphones (priority: 9000)
Active Port: analog-output-speaker
Formats:
pcm
Audio Source nodes :
sanj#sanj:~$ pactl list sources
Source #0
State: SUSPENDED
Name: alsa_output.platform-byt-rt5640.analog-stereo.monitor
Description: Monitor of byt-rt5640 Analog Stereo
Driver: module-alsa-card.c
Sample Specification: s16le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 6
Mute: no
Volume: front-left: 65536 / 100% / 0.00 dB, front-right: 65536 / 100% / 0.00 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor of Sink: alsa_output.platform-byt-rt5640.analog-stereo
Latency: 0 usec, configured 0 usec
Flags: DECIBEL_VOLUME LATENCY
Properties:
device.description = "Monitor of byt-rt5640 Analog Stereo"
device.class = "monitor"
alsa.card = "0"
alsa.card_name = "byt-rt5640"
alsa.long_card_name = "byt-rt5640"
alsa.driver_name = "snd_soc_sst_byt_rt5640_mach"
device.bus_path = "platform-byt-rt5640"
sysfs.path = "/devices/platform/80860F28:00/byt-rt5640/sound/card0"
device.string = "0"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card"
Formats:
pcm
Source #1
State: SUSPENDED
Name: alsa_input.platform-byt-rt5640.analog-stereo
Description: byt-rt5640 Analog Stereo
Driver: module-alsa-card.c
Sample Specification: s16le 2ch 48000Hz
Channel Map: front-left,front-right
Owner Module: 6
Mute: no
Volume: front-left: 93554 / 143% / 9.27 dB, front-right: 93554 / 143% / 9.27 dB
balance 0.00
Base Volume: 65536 / 100% / 0.00 dB
Monitor of Sink: n/a
Latency: 0 usec, configured 0 usec
Flags: HARDWARE DECIBEL_VOLUME LATENCY
Properties:
alsa.resolution_bits = "16"
device.api = "alsa"
device.class = "sound"
alsa.class = "generic"
alsa.subclass = "generic-mix"
alsa.name = ""
alsa.id = "Audio rt5640-aif1-0"
alsa.subdevice = "0"
alsa.subdevice_name = "subdevice #0"
alsa.device = "0"
alsa.card = "0"
alsa.card_name = "byt-rt5640"
alsa.long_card_name = "byt-rt5640"
alsa.driver_name = "snd_soc_sst_byt_rt5640_mach"
device.bus_path = "platform-byt-rt5640"
sysfs.path = "/devices/platform/80860F28:00/byt-rt5640/sound/card0"
device.string = "hw:0"
device.buffering.buffer_size = "96000"
device.buffering.fragment_size = "48000"
device.access_mode = "mmap+timer"
device.profile.name = "analog-stereo"
device.profile.description = "Analog Stereo"
device.description = "byt-rt5640 Analog Stereo"
module-udev-detect.discovered = "1"
device.icon_name = "audio-card"
Ports:
analog-input: Analog Input (priority: 10000)
Active Port: analog-input
Formats:
pcm
sanj#sanj:~$
To test whether audio is coming to sink or not, I am using pulseaudio commands paplay and parecord from different terminals. Since source 0 is the source-monitor node for sink node 0, I captured audio from it.
sanj#sanj:~$ paplay Dhaakad.wav
sanj#sanj:~$ parecord -d 0 > test.wav
Then I tested the captured audio file test.wav with audacity on a PC and it was playing fine. I am not able to figure out why the audio not coming from speaker. I also tried to change the audio settings with alsamixer but nothing worked out.
I am trying to get sorted document set in response according to associated piped weight in multivalued field in solr 5.5.0 payload , but when I used debugQuery=true I am getting scores of all documents same irrespective of associated weights
http://localhost:8983/solr/catalog/select?q=payloads%3AABC&wt=json&indent=true&debugQuery=true
{
"responseHeader":{
"status":0,
"QTime":5
},
"response":{
"numFound":8,
"start":0,
"docs":[
{
"id":"NOK5",
"name":"One Krone",
"manu_id_s":"nor",
"price_c":"1,NOK",
"payloads":[
"ABC|110.0"
],
"_version_":1549328956822388700,
"last_updated":"2016-10-27T08:00:33.785Z"
},
{
"id":"NOK4",
"name":"One Krone",
"manu_id_s":"nor",
"price_c":"1,NOK",
"payloads":[
"ABC|90.0"
],
"_version_":1549328945950752800,
"last_updated":"2016-10-27T08:00:23.417Z"
},
...
]
},
"debug":{
"rawquerystring":"payloads:ABC",
"querystring":"payloads:ABC",
"parsedquery":"payloads:ABC",
"parsedquery_toString":"payloads:ABC",
"explain":{
"NOK5":" 52.870323 = weight(payloads:ABC in 1) [], result of: 52.870323 = score(doc=1,freq=1.0), product of: 7.2711983 = queryWeight, product of: 7.2711983 = idf(docFreq=8, maxDocs=4762) 1.0 = queryNorm 7.2711983 = fieldWeight in 1, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 7.2711983 = idf(docFreq=8, maxDocs=4762) 1.0 = fieldNorm(doc=1) ",
"NOK4":" 52.870323 = weight(payloads:ABC in 1) [], result of: 52.870323 = score(doc=1,freq=1.0), product of: 7.2711983 = queryWeight, product of: 7.2711983 = idf(docFreq=8, maxDocs=4762) 1.0 = queryNorm 7.2711983 = fieldWeight in 1, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 7.2711983 = idf(docFreq=8, maxDocs=4762) 1.0 = fieldNorm(doc=1) ",
"NOK150":" 52.870323 = weight(payloads:ABC in 0) [], result of: 52.870323 = score(doc=0,freq=1.0), product of: 7.2711983 = queryWeight, product of: 7.2711983 = idf(docFreq=8, maxDocs=4762) 1.0 = queryNorm 7.2711983 = fieldWeight in 0, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 7.2711983 = idf(docFreq=8, maxDocs=4762) 1.0 = fieldNorm(doc=0) ",
"NOK3":" 52.870323 = weight(payloads:ABC in 1) [], result of: 52.870323 = score(doc=1,freq=1.0), product of: 7.2711983 = queryWeight, product of: 7.2711983 = idf(docFreq=8, maxDocs=4762) 1.0 = queryNorm 7.2711983 = fieldWeight in 1, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 7.2711983 = idf(docFreq=8, maxDocs=4762) 1.0 = fieldNorm(doc=1) ",
"NOK7":" 52.870323 = weight(payloads:ABC in 2) [], result of: 52.870323 = score(doc=2,freq=1.0), product of: 7.2711983 = queryWeight, product of: 7.2711983 = idf(docFreq=8, maxDocs=4762) 1.0 = queryNorm 7.2711983 = fieldWeight in 2, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 7.2711983 = idf(docFreq=8, maxDocs=4762) 1.0 = fieldNorm(doc=2) ",
"NOK1":" 52.870323 = weight(payloads:ABC in 0) [], result of: 52.870323 = score(doc=0,freq=1.0), product of: 7.2711983 = queryWeight, product of: 7.2711983 = idf(docFreq=8, maxDocs=4762) 1.0 = queryNorm 7.2711983 = fieldWeight in 0, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 7.2711983 = idf(docFreq=8, maxDocs=4762) 1.0 = fieldNorm(doc=0) ",
"NOK2":" 52.870323 = weight(payloads:ABC in 1) [], result of: 52.870323 = score(doc=1,freq=1.0), product of: 7.2711983 = queryWeight, product of: 7.2711983 = idf(docFreq=8, maxDocs=4762) 1.0 = queryNorm 7.2711983 = fieldWeight in 1, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 7.2711983 = idf(docFreq=8, maxDocs=4762) 1.0 = fieldNorm(doc=1) ",
"NOK6":" 52.870323 = weight(payloads:ABC in 2) [], result of: 52.870323 = score(doc=2,freq=1.0), product of: 7.2711983 = queryWeight, product of: 7.2711983 = idf(docFreq=8, maxDocs=4762) 1.0 = queryNorm 7.2711983 = fieldWeight in 2, product of: 1.0 = tf(freq=1.0), with freq of: 1.0 = termFreq=1.0 7.2711983 = idf(docFreq=8, maxDocs=4762) 1.0 = fieldNorm(doc=2) "
},
"QParser":"LuceneQParser",
"timing":{
...
}
}
}
Can someone please help.
I am experimenting with creating high-performance, good-looking pencil tools using SVG paths.
I am logging the mouse coordinates to draw a path. To get a high-fidelity path (accurate to the user's movements) I need to log a point for every pixel movement.
Keeping each and every point in the path creates a huge amount of points which is not ideal for collaborative features later-on (sending huge amount of points back and forth is not efficient), plus parsing huge paths every time I need to manipulate them is a bottleneck
On linear areas of the path, redundant points are removed keeping only the points necessary to represent the segment - I do this using the Ramer-Douglas-Peucker algorithm.
But simplifying a path turns it into a low-fidelity polygon
At this point the paths are effectively just connected lines - therefore the paths look jagged.
A possible solution is to connect the path points with Cubic Bezier's - however this doesn't work nice on simplified paths. The distance between each point is too large for the Cubic Bezier's to "sit" nice so the smoothed path no longer accurately represents the intended path of the user.
Another solution is to simply use a "post-processing" algorithm such as Schneider's Algorithm on the original path - This algorithm won't practically work in real-time though since it's a performance hog
An ideal solution
A solution that(I think) could work is to use a Centripetal Catmull-Rom interpolation.
Out of all the algorithms I researched, this seems to be the most promising since:
It doesn't create self-intersections on tight corners
It fits more snug on the points thus it more accurately represents the
original path.
Is Catmull-Rom an algorithm that interpolates a series of
regular x/y points or does the original path need to be comprised of
curves?
To answer your questions directly:
Yes. Catmull-Rom spline is an algorithm to interpolate a series of (x, y, z) points. It will generate a cubic polynomial curve between each two consecutive points.
You cannot direcly use Catmull Rom spline for SVG path. You need to convert it to cubic Bezier curve first.
For a curve segment defined by point P0, P1, P2 and P3 and knot sequence t0, t1, t2, t3, the centripetal Catmull-Rom spline (defined between point P1 and P2) can be computed by the recursive formula provided in https://en.wikipedia.org/wiki/Centripetal_Catmull%E2%80%93Rom_spline. Therefore, I will not elaborate here.
To convert it to cubic Bezier curve, you need to compute the first
derivative at P1 and P2 as
M1 = (t2-t1)*(c1*(P1-P0)/(t1-t0) + c2*(P2-P1)/(t2-t1))
M2 = (t2-t1)*(d1*(P2-P1)/(t2-t1) + d2*(P3-P2)/(t3-t2))
Where
c1 = (t2-t1)/(t2-t0),
c2 = (t1-t0)/(t2-t0),
d1 = (t3-t2)/(t3-t1),
d2 = (t2-t1)/(t3-t1)
Then you can convert it to cubic Bezier curve with 4 control points: Q0, Q1, Q2 and Q3:
Q0 = P1
Q1 = P1 + M1/3
Q2 = P2 - M2/3
Q3 = P2
I use interpolation cubics for this
sample point on
mouse direction change in any axis
if mouse traveled some distance for more precision can add: if the angle of direction change too much (I do not use this)
if mouse stops (this can be ignored if you use on mouse up/down too)
use the sampled points as control points for interpolation cubic
see Interpolation cubic vs. Bezier cubic you find there also the transformation between interpolation and Bezier cubic
if that is not enough you can join lines with the same direction
Here an example of hand drawings in this way:
And the SVG:
<svg width="512" height="512" viewBox="-131.734968 -63.890725 383.802249 203.65153" >
<path fill="none" stroke="black" stroke-width="1px" data-tool="-1" data-cfg="-1" data-group="-1" data-hair="0" data-dir="0" transform="matrix(1,0,0,1,0,0" d="M -81.842337 36.317509 c 0 0 -0.494188 0.282842 0 0 c 0 0 4.1653 -2.262737 4.447693 -2.545579 c 0.494188 -0.282842 2.188547 -2.262737 2.541539 -2.545579 c 0.282393 -0.282842 2.823932 -2.192026 3.176923 -2.545579 c 0.352991 -0.282842 2.965128 -2.828421 3.176923 -3.181974 c 0.352991 -0.353552 1.623761 -2.899132 1.906154 -3.181974 c 0.211794 -0.353552 2.329744 -2.192026 2.541539 -2.545579 c 0.282393 -0.282842 1.623761 -2.969842 1.906154 -3.181974 c 0.211794 -0.353552 2.400342 -1.697053 2.541539 -1.909184 c 0.282393 -0.212131 0.988376 -1.626342 1.270769 -1.909184 c 0.141196 -0.212131 2.329744 -2.333447 2.541539 -2.545579 c 0.282393 -0.282842 1.411966 -1.626342 1.906154 -1.909184 c 0.211794 -0.212131 3.953505 -2.474869 4.447693 -2.545579 c 0.494188 -0.282842 4.024103 -0.565684 4.447693 -0.636394 c 0.494188 -0.07071 3.247522 -0.494973 3.812308 -0.636394 c 0.423589 -0.07071 4.730086 -1.272789 5.083078 -1.272789 c 0.564786 -0.141421 2.823932 0 3.176923 0 c 0.352991 0 2.823932 0 3.176923 0 c 0.352991 0 2.753333 0 3.176923 0 c 0.352991 0 3.31812 -0.212131 3.812308 0 c 0.423589 0 4.024103 1.626342 4.447693 1.909184 c 0.494188 0.212131 3.459317 2.192026 3.812308 2.545579 c 0.423589 0.282842 2.965128 2.828421 3.176923 3.181974 c 0.352991 0.353552 1.764957 2.61629 1.906154 3.181974 c 0.211794 0.353552 1.270769 4.454764 1.270769 5.091159 c 0.141196 0.565684 0 5.23258 0 5.727554 c 0 0.636394 0 3.889079 0 4.454764 c 0 0.494973 -0.070598 4.596185 0 5.091159 c 0 0.565684 0.423589 4.101211 0.635384 4.454764 c 0.070598 0.494973 1.623761 2.899132 1.906154 3.181974 c 0.211794 0.353552 1.976752 2.474869 2.541539 2.545579 c 0.282393 0.282842 4.730086 0.636394 5.083078 0.636394 c 0.564786 0.07071 2.753333 0 3.176923 0 c 0.352991 0 3.529915 0 3.812308 0 c 0.423589 0 2.04735 0 2.541539 0 c 0.282393 0 4.024103 0 4.447693 0 c 0.494188 0 3.459317 0.07071 3.812308 0 c 0.423589 0 2.89453 -0.565684 3.176923 -0.636394 c 0.352991 -0.07071 2.04735 -0.353552 2.541539 -0.636394 c 0.282393 -0.07071 4.235898 -2.404158 4.447693 -2.545579 c 0.494188 -0.282842 1.482564 -0.989947 1.906154 -1.272789 c 0.211794 -0.141421 3.600513 -2.262737 3.812308 -2.545579 c 0.423589 -0.282842 1.694359 -2.262737 1.906154 -2.545579 c 0.211794 -0.282842 1.623761 -2.192026 1.906154 -2.545579 c 0.211794 -0.282842 2.329744 -2.969842 2.541539 -3.181974 c 0.282393 -0.353552 1.553162 -1.555631 1.906154 -1.909184 c 0.211794 -0.212131 2.823932 -2.899132 3.176923 -3.181974 c 0.352991 -0.353552 2.823932 -2.333447 3.176923 -2.545579 c 0.352991 -0.282842 2.753333 -1.697053 3.176923 -1.909184 c 0.352991 -0.212131 3.459317 -1.838474 3.812308 -1.909184 c 0.423589 -0.212131 2.823932 -0.565684 3.176923 -0.636394 c 0.352991 -0.07071 2.823932 -0.636394 3.176923 -0.636394 c 0.352991 -0.07071 2.823932 0 3.176923 0 c 0.352991 0 2.541539 -0.07071 3.176923 0 c 0.352991 0 5.436069 0.353552 5.718462 0.636394 c 0.635384 0.07071 2.400342 2.050605 2.541539 2.545579 c 0.282393 0.282842 1.058974 4.030501 1.270769 4.454764 c 0.141196 0.494973 1.835555 3.394106 1.906154 3.818369 c 0.211794 0.424263 0.423589 3.323395 0.635384 3.818369 c 0.070598 0.424263 1.553162 3.95979 1.906154 4.454764 c 0.211794 0.494973 2.753333 4.313343 3.176923 4.454764 c 0.352991 0.494973 3.459317 1.131368 3.812308 1.272789 c 0.423589 0.141421 2.823932 1.202079 3.176923 1.272789 c 0.352991 0.141421 2.682735 0.636394 3.176923 0.636394 c 0.352991 0.07071 3.74171 0 4.447693 0 c 0.494188 0 6.000856 0 6.353847 0 c 0.705983 0 2.753333 0 3.176923 0 c 0.352991 0 3.459317 0.07071 3.812308 0 c 0.423589 0 2.682735 -0.424263 3.176923 -0.636394 c 0.352991 -0.07071 4.1653 -1.697053 4.447693 -1.909184 c 0.494188 -0.212131 2.259145 -1.697053 2.541539 -1.909184 c 0.282393 -0.212131 2.04735 -1.697053 2.541539 -1.909184 c 0.282393 -0.212131 4.235898 -1.626342 4.447693 -1.909184 c 0.494188 -0.212131 1.553162 -2.333447 1.906154 -2.545579 c 0.211794 -0.282842 2.753333 -1.697053 3.176923 -1.909184 c 0.352991 -0.212131 3.529915 -1.767763 3.812308 -1.909184 c 0.423589 -0.212131 2.04735 -1.202079 2.541539 -1.272789 c 0.282393 -0.141421 4.094701 -0.636394 4.447693 -0.636394 c 0.494188 -0.07071 2.823932 0 3.176923 0 c 0.352991 0 2.823932 0 3.176923 0 c 0.352991 0 2.753333 0 3.176923 0 c 0.352991 0 3.388718 -0.212131 3.812308 0 c 0.423589 0 3.388718 1.767763 3.812308 1.909184 c 0.423589 0.212131 3.459317 0.919237 3.812308 1.272789 c 0.423589 0.141421 2.965128 2.969842 3.176923 3.181974 c 0.352991 0.353552 1.764957 1.555631 1.906154 1.909184 c 0.211794 0.212131 1.058974 2.899132 1.270769 3.181974 c 0.141196 0.353552 1.835555 2.192026 1.906154 2.545579 c 0.211794 0.282842 0.352991 2.828421 0.635384 3.181974 c 0.070598 0.353552 2.259145 2.899132 2.541539 3.181974 c 0.282393 0.353552 2.117949 2.474869 2.541539 2.545579 c 0.282393 0.282842 3.459317 0.565684 3.812308 0.636394 c 0.423589 0.07071 2.823932 0.636394 3.176923 0.636394 c 0.352991 0.07071 2.823932 -0.07071 3.176923 0 c 0.352991 0 2.753333 0.565684 3.176923 0.636394 c 0.352991 0.07071 3.459317 0.636394 3.812308 0.636394 c 0.423589 0.07071 2.823932 0 3.176923 0 c 0.352991 0 2.682735 0.07071 3.176923 0 c 0.352991 0 4.1653 -0.636394 4.447693 -0.636394 c 0.494188 -0.07071 2.188547 0.212131 2.541539 0 c 0.282393 0 2.682735 -1.697053 3.176923 -1.909184 c 0.352991 -0.212131 4.235898 -1.767763 4.447693 -1.909184 c 0.494188 -0.212131 1.623761 -1.131368 1.906154 -1.272789 c 0.211794 -0.141421 2.329744 -1.060658 2.541539 -1.272789 c 0.282393 -0.141421 1.906154 -1.909184 1.906154 -1.909184 c 0.211794 -0.212131 0 0 0 0m -334.847767 40.092879 c 0 0 -0.352991 -0.141421 0 0 c 0 0 2.682735 1.131368 3.176923 1.272789 c 0.352991 0.141421 4.1653 1.202079 4.447693 1.272789 c 0.494188 0.141421 2.259145 0.494973 2.541539 0.636394 c 0.282393 0.07071 2.188547 1.202079 2.541539 1.272789 c 0.282393 0.141421 2.823932 0.565684 3.176923 0.636394 c 0.352991 0.07071 2.753333 0.565684 3.176923 0.636394 c 0.352991 0.07071 3.459317 0.636394 3.812308 0.636394 c 0.423589 0.07071 2.823932 0 3.176923 0 c 0.352991 0 2.823932 0 3.176923 0 c 0.352991 0 2.823932 0 3.176923 0 c 0.352991 0 2.89453 0 3.176923 0 c 0.352991 0 2.188547 0 2.541539 0 c 0.282393 0 2.823932 0 3.176923 0 c 0.352991 0 2.753333 0 3.176923 0 c 0.352991 0 3.529915 0.141421 3.812308 0 c 0.423589 0 2.04735 -0.989947 2.541539 -1.272789 c 0.282393 -0.141421 4.1653 -2.262737 4.447693 -2.545579 c 0.494188 -0.282842 2.329744 -2.192026 2.541539 -2.545579 c 0.282393 -0.282842 1.835555 -2.687 1.906154 -3.181974 c 0.211794 -0.353552 0.564786 -3.95979 0.635384 -4.454764 c 0.070598 -0.494973 1.200171 -4.242632 0.635384 -4.454764 c 0.070598 -0.494973 -4.659488 -2.050605 -5.083078 -1.909184 c -0.564786 -0.212131 -3.529915 0.989947 -3.812308 1.272789 c -0.423589 0.141421 -2.188547 1.979895 -2.541539 2.545579 c -0.282393 0.282842 -3.176923 4.525474 -3.176923 5.091159 c -0.352991 0.565684 0 4.525474 0 5.091159 c 0 0.565684 -0.282393 4.808317 0 5.091159 c 0 0.565684 2.259145 2.474869 2.541539 2.545579 c 0.282393 0.282842 2.117949 0.424263 2.541539 0.636394 c 0.282393 0.07071 3.388718 1.838474 3.812308 1.909184 c 0.423589 0.212131 3.247522 0.565684 3.812308 0.636394 c 0.423589 0.07071 4.588889 0.636394 5.083078 0.636394 c 0.564786 0.07071 4.1653 0 4.447693 0 c 0.494188 0 2.04735 0 2.541539 0 c 0.282393 0 3.953505 0 4.447693 0 c 0.494188 0 3.671111 0.212131 4.447693 0 c 0.494188 0 6.565642 -1.838474 6.989232 -1.909184 c 0.776581 -0.212131 3.459317 -0.424263 3.812308 -0.636394 c 0.423589 -0.07071 2.753333 -1.767763 3.176923 -1.909184 c 0.352991 -0.212131 3.459317 -0.989947 3.812308 -1.272789 c 0.423589 -0.141421 2.823932 -2.050605 3.176923 -2.545579 c 0.352991 -0.282842 3.106325 -4.030501 3.176923 -4.454764 c 0.352991 -0.494973 1.058974 -3.676948 0.635384 -3.818369 c 0.070598 -0.424263 -3.388718 -1.484921 -3.812308 -1.272789 c -0.423589 -0.141421 -3.459317 1.697053 -3.812308 1.909184 c -0.423589 0.212131 -2.823932 1.626342 -3.176923 1.909184 c -0.352991 0.212131 -2.89453 2.262737 -3.176923 2.545579 c -0.352991 0.282842 -2.47094 2.050605 -2.541539 2.545579 c -0.282393 0.282842 -0.635384 3.889079 -0.635384 4.454764 c -0.070598 0.494973 -0.282393 4.808317 0 5.091159 c 0 0.565684 2.329744 2.404158 2.541539 2.545579 c 0.282393 0.282842 1.623761 1.131368 1.906154 1.272789 c 0.211794 0.141421 2.259145 1.202079 2.541539 1.272789 c 0.282393 0.141421 1.976752 0.424263 2.541539 0.636394 c 0.282393 0.07071 4.588889 1.909184 5.083078 1.909184 c 0.564786 0.212131 3.882906 -0.07071 4.447693 0 c 0.494188 0 4.800684 0.636394 5.083078 0.636394 c 0.564786 0.07071 2.188547 0 2.541539 0 c 0.282393 0 2.823932 -0.07071 3.176923 0 c 0.352991 0 2.612137 0.636394 3.176923 0.636394 c 0.352991 0.07071 4.730086 0 5.083078 0 c 0.564786 0 2.89453 0 3.176923 0 c 0.352991 0 2.188547 0.07071 2.541539 0 c 0.282393 0 2.753333 -0.494973 3.176923 -0.636394 c 0.352991 -0.07071 3.247522 -0.989947 3.812308 -1.272789 c 0.423589 -0.141421 4.730086 -2.333447 5.083078 -2.545579 c 0.564786 -0.282842 2.89453 -1.555631 3.176923 -1.909184 c 0.352991 -0.212131 2.400342 -2.969842 2.541539 -3.181974 c 0.282393 -0.353552 1.129572 -1.484921 1.270769 -1.909184 c 0.141196 -0.212131 1.270769 -3.394106 1.270769 -3.818369 c 0.141196 -0.424263 0 -3.394106 0 -3.818369 c 0 -0.424263 0.352991 -3.606237 0 -3.818369 c 0 -0.424263 -2.682735 -1.909184 -3.176923 -1.909184 c -0.352991 -0.212131 -4.024103 -0.07071 -4.447693 0 c -0.494188 0 -3.671111 0.353552 -3.812308 0.636394 c -0.423589 0.07071 -1.200171 1.979895 -1.270769 2.545579 c -0.141196 0.282842 -0.705983 4.525474 -0.635384 5.091159 c -0.070598 0.565684 0.352991 4.666895 0.635384 5.091159 c 0.070598 0.565684 2.259145 3.535527 2.541539 3.818369 c 0.282393 0.424263 2.259145 2.333447 2.541539 2.545579 c 0.282393 0.282842 2.04735 1.626342 2.541539 1.909184 c 0.282393 0.212131 3.882906 2.333447 4.447693 2.545579 c 0.494188 0.282842 4.800684 1.909184 5.083078 1.909184 c 0.564786 0.212131 2.188547 -0.212131 2.541539 0 c 0.282393 0 2.89453 1.909184 3.176923 1.909184 c 0.352991 0.212131 2.04735 -0.141421 2.541539 0 c 0.282393 0 4.024103 1.131368 4.447693 1.272789 c 0.494188 0.141421 3.247522 1.272789 3.812308 1.272789 c 0.423589 0.141421 4.800684 0 5.083078 0 c 0.564786 0 2.188547 0 2.541539 0 c 0.282393 0 2.823932 0 3.176923 0 c 0.352991 0 2.823932 0 3.176923 0 c 0.352991 0 2.682735 0 3.176923 0 c 0.352991 0 4.1653 0 4.447693 0 c 0.494188 0 2.188547 0.07071 2.541539 0 c 0.282393 0 2.823932 -0.565684 3.176923 -0.636394 c 0.352991 -0.07071 2.823932 -0.424263 3.176923 -0.636394 c 0.352991 -0.07071 2.612137 -1.626342 3.176923 -1.909184 c 0.352991 -0.212131 4.800684 -2.333447 5.083078 -2.545579 c 0.564786 -0.282842 2.188547 -1.626342 2.541539 -1.909184 c 0.282393 -0.212131 2.89453 -2.262737 3.176923 -2.545579 c 0.352991 -0.282842 2.329744 -2.192026 2.541539 -2.545579 c 0.282393 -0.282842 1.764957 -2.61629 1.906154 -3.181974 c 0.211794 -0.353552 1.270769 -4.384053 1.270769 -5.091159 c 0.141196 -0.565684 0.635384 -6.222527 0 -6.363949 c 0 -0.707105 -5.294872 -1.202079 -5.718462 -1.272789 c -0.635384 -0.141421 -3.31812 -0.636394 -3.812308 -0.636394 c -0.423589 -0.07071 -4.094701 -0.353552 -4.447693 0 c -0.494188 0 -3.176923 2.61629 -3.176923 3.181974 c -0.352991 0.353552 0 4.525474 0 5.091159 c 0 0.565684 -0.211794 4.525474 0 5.091159 c 0 0.565684 1.694359 4.949738 1.906154 5.091159 c 0.211794 0.565684 1.694359 1.060658 1.906154 1.272789 c 0.211794 0.141421 1.694359 1.767763 1.906154 1.909184 c 0.211794 0.212131 1.694359 1.131368 1.906154 1.272789 c 0.211794 0.141421 1.553162 0.989947 1.906154 1.272789 c 0.211794 0.141421 2.89453 2.404158 3.176923 2.545579 c 0.352991 0.282842 2.259145 1.202079 2.541539 1.272789 c 0.282393 0.141421 2.259145 0.494973 2.541539 0.636394 c 0.282393 0.07071 2.117949 1.131368 2.541539 1.272789 c 0.282393 0.141421 3.388718 1.202079 3.812308 1.272789 c 0.423589 0.141421 3.459317 0.494973 3.812308 0.636394 c 0.423589 0.07071 2.823932 1.272789 3.176923 1.272789 c 0.352991 0.141421 2.89453 0 3.176923 0 c 0.352991 0 2.188547 0 2.541539 0 c 0.282393 0 2.823932 0 3.176923 0 c 0.352991 0 2.823932 0 3.176923 0 c 0.352991 0 2.89453 0 3.176923 0 c 0.352991 0 2.188547 0 2.541539 0 c 0.282393 0 2.753333 0.07071 3.176923 0 c 0.352991 0 3.388718 -0.494973 3.812308 -0.636394 c 0.423589 -0.07071 3.388718 -0.919237 3.812308 -1.272789 c 0.423589 -0.141421 3.600513 -2.61629 3.812308 -3.181974 c 0.423589 -0.353552 1.835555 -4.596185 1.906154 -5.091159 c 0.211794 -0.565684 0.635384 -3.889079 0.635384 -4.454764 c 0.070598 -0.494973 0.211794 -4.525474 0 -5.091159 c 0 -0.565684 -1.553162 -4.879027 -1.906154 -5.091159 c -0.211794 -0.565684 -2.47094 -1.979895 -3.176923 -1.909184 c -0.352991 -0.212131 -6.142052 0.353552 -6.353847 0.636394 c -0.705983 0.07071 -1.694359 2.192026 -1.906154 2.545579 c -0.211794 0.282842 -1.835555 2.757711 -1.906154 3.181974 c -0.211794 0.353552 -0.564786 3.323395 -0.635384 3.818369 c -0.070598 0.424263 -0.776581 4.030501 -0.635384 4.454764 c -0.070598 0.494973 1.058974 3.535527 1.270769 3.818369 c 0.141196 0.424263 1.482564 2.333447 1.906154 2.545579 c 0.211794 0.282842 3.600513 1.767763 3.812308 1.909184 c 0.423589 0.212131 1.482564 1.131368 1.906154 1.272789 c 0.211794 0.141421 3.31812 1.131368 3.812308 1.272789 c 0.423589 0.141421 4.024103 1.202079 4.447693 1.272789 c 0.494188 0.141421 3.459317 0.636394 3.812308 0.636394 c 0.423589 0.07071 2.682735 0 3.176923 0 c 0.352991 0 4.094701 0 4.447693 0 c 0.494188 0 2.89453 0 3.176923 0 c 0.352991 0 2.117949 0 2.541539 0 c 0.282393 0 3.459317 0 3.812308 0 c 0.423589 0 2.89453 0.141421 3.176923 0 c 0.352991 0 2.04735 -1.060658 2.541539 -1.272789 c 0.282393 -0.141421 4.024103 -1.626342 4.447693 -1.909184 c 0.494188 -0.212131 3.600513 -2.333447 3.812308 -2.545579 c 0.423589 -0.282842 1.623761 -1.484921 1.906154 -1.909184 c 0.211794 -0.212131 2.400342 -3.676948 2.541539 -3.818369 c 0.282393 -0.424263 1.270769 -1.272789 1.270769 -1.272789 c 0.141196 -0.141421 0 0 0 0m -261.143135 -114.551083 c 0 0 -0.352991 0.212131 0 0 c 0 0 2.823932 -1.767763 3.176923 -1.909184 c 0.352991 -0.212131 2.89453 -1.202079 3.176923 -1.272789 c 0.352991 -0.141421 2.259145 -0.424263 2.541539 -0.636394 c 0.282393 -0.07071 2.117949 -1.626342 2.541539 -1.909184 c 0.282393 -0.212131 3.600513 -2.262737 3.812308 -2.545579 c 0.423589 -0.282842 1.623761 -2.404158 1.906154 -2.545579 c 0.211794 -0.282842 2.188547 -0.848526 2.541539 -1.272789 c 0.282393 -0.141421 2.89453 -3.464816 3.176923 -3.818369 c 0.352991 -0.424263 2.47094 -2.828421 2.541539 -3.181974 c 0.282393 -0.353552 0.423589 -2.828421 0.635384 -3.181974 c 0.070598 -0.353552 1.764957 -2.969842 1.906154 -3.181974 c 0.211794 -0.353552 1.270769 -2.474869 1.270769 -1.909184 c 0.141196 -0.212131 0 4.737606 0 5.091159 c 0 0.565684 -0.141196 2.828421 0 3.181974 c 0 0.353552 1.129572 2.757711 1.270769 3.181974 c 0.141196 0.353552 1.129572 3.323395 1.270769 3.818369 c 0.141196 0.424263 1.058974 4.030501 1.270769 4.454764 c 0.141196 0.494973 1.553162 3.323395 1.906154 3.818369 c 0.211794 0.424263 2.89453 4.171922 3.176923 4.454764 c 0.352991 0.494973 2.117949 2.404158 2.541539 2.545579 c 0.282393 0.282842 3.459317 1.060658 3.812308 1.272789 c 0.423589 0.141421 2.753333 1.909184 3.176923 1.909184 c 0.352991 0.212131 3.31812 0.212131 3.812308 0 c 0.423589 0 4.235898 -1.767763 4.447693 -1.909184 c 0.494188 -0.212131 1.411966 -0.919237 1.906154 -1.272789 c 0.211794 -0.141421 4.1653 -2.828421 4.447693 -3.181974 c 0.494188 -0.353552 1.976752 -2.687 2.541539 -3.181974 c 0.282393 -0.353552 4.800684 -4.101211 5.083078 -4.454764 c 0.564786 -0.494973 2.400342 -2.899132 2.541539 -3.181974 c 0.282393 -0.353552 1.058974 -2.262737 1.270769 -2.545579 c 0.141196 -0.282842 1.623761 -2.121316 1.906154 -2.545579 c 0.211794 -0.282842 2.259145 -3.323395 2.541539 -3.818369 c 0.282393 -0.424263 2.329744 -4.737606 2.541539 -4.454764 c 0.282393 -0.494973 1.835555 2.192026 1.906154 2.545579 c 0.211794 0.282842 0.564786 2.757711 0.635384 3.181974 c 0.070598 0.353552 0.494188 3.323395 0.635384 3.818369 c 0.070598 0.424263 1.129572 3.95979 1.270769 4.454764 c 0.141196 0.494973 1.058974 3.95979 1.270769 4.454764 c 0.141196 0.494973 1.553162 4.101211 1.906154 4.454764 c 0.211794 0.494973 3.035727 2.969842 3.176923 3.181974 c 0.352991 0.353552 0.776581 1.767763 1.270769 1.909184 c 0.141196 0.212131 3.953505 1.272789 4.447693 1.272789 c 0.494188 0.141421 4.094701 0 4.447693 0 c 0.494188 0 2.753333 0 3.176923 0 c 0.352991 0 3.388718 0.141421 3.812308 0 c 0.423589 0 3.388718 -1.060658 3.812308 -1.272789 c 0.423589 -0.141421 3.529915 -1.555631 3.812308 -1.909184 c 0.423589 -0.212131 2.259145 -2.899132 2.541539 -3.181974 c 0.282393 -0.353552 2.329744 -2.192026 2.541539 -2.545579 c 0.282393 -0.282842 1.764957 -2.828421 1.906154 -3.181974 c 0.211794 -0.353552 1.129572 -2.969842 1.270769 -3.181974 c 0.141196 -0.353552 0.988376 -1.555631 1.270769 -1.909184 c 0.141196 -0.212131 2.188547 -3.040553 2.541539 -3.181974 c 0.282393 -0.353552 3.106325 -1.767763 3.176923 -1.272789 c 0.352991 -0.141421 0.494188 3.95979 0.635384 4.454764 c 0.070598 0.494973 1.200171 4.030501 1.270769 4.454764 c 0.141196 0.494973 0.494188 3.252685 0.635384 3.818369 c 0.070598 0.424263 1.058974 4.666895 1.270769 5.091159 c 0.141196 0.565684 1.694359 3.394106 1.906154 3.818369 c 0.211794 0.424263 1.623761 3.464816 1.906154 3.818369 c 0.211794 0.424263 2.117949 2.899132 2.541539 3.181974 c 0.282393 0.353552 3.388718 2.474869 3.812308 2.545579 c 0.423589 0.282842 3.31812 0.636394 3.812308 0.636394 c 0.423589 0.07071 4.024103 0 4.447693 0 c 0.494188 0 3.31812 0 3.812308 0 c 0.423589 0 4.024103 0.07071 4.447693 0 c 0.494188 0 3.31812 -0.353552 3.812308 -0.636394 c 0.423589 -0.07071 4.024103 -2.262737 4.447693 -2.545579 c 0.494188 -0.282842 3.388718 -2.192026 3.812308 -2.545579 c 0.423589 -0.282842 3.600513 -2.899132 3.812308 -3.181974 c 0.423589 -0.353552 1.623761 -2.333447 1.906154 -2.545579 c 0.211794 -0.282842 2.400342 -1.555631 2.541539 -1.909184 c 0.282393 -0.212131 0.917777 -2.828421 1.270769 -3.181974 c 0.141196 -0.353552 3.035727 -2.757711 3.176923 -3.181974 c 0.352991 -0.353552 0.988376 -3.889079 1.270769 -3.818369 c 0.141196 -0.424263 2.47094 0.282842 2.541539 0.636394 c 0.282393 0.07071 0.635384 2.757711 0.635384 3.181974 c 0.070598 0.353552 -0.070598 3.464816 0 3.818369 c 0 0.424263 0.564786 2.61629 0.635384 3.181974 c 0.070598 0.353552 0.564786 4.666895 0.635384 5.091159 c 0.070598 0.565684 0.494188 3.464816 0.635384 3.818369 c 0.070598 0.424263 0.988376 2.757711 1.270769 3.181974 c 0.141196 0.353552 1.976752 3.818369 2.541539 3.818369 c 0.282393 0.424263 4.800684 0 5.083078 0 c 0.564786 0 2.04735 0 2.541539 0 c 0.282393 0 4.094701 0 4.447693 0 c 0.494188 0 2.753333 0 3.176923 0 c 0.352991 0 3.388718 0.212131 3.812308 0 c 0.423589 0 3.459317 -1.697053 3.812308 -1.909184 c 0.423589 -0.212131 2.823932 -1.555631 3.176923 -1.909184 c 0.352991 -0.212131 2.89453 -2.969842 3.176923 -3.181974 c 0.352991 -0.353552 2.259145 -1.555631 2.541539 -1.909184 c 0.282393 -0.212131 2.259145 -2.899132 2.541539 -3.181974 c 0.282393 -0.353552 2.188547 -2.192026 2.541539 -2.545579 c 0.282393 -0.282842 2.89453 -2.828421 3.176923 -3.181974 c 0.352991 -0.353552 2.47094 -2.899132 2.541539 -3.181974 c 0.282393 -0.353552 0.635384 -2.545579 0.635384 -2.545579 c 0.070598 -0.282842 0 0 0 0 "/>
</svg>
It is around 20KB if you play with tresholds you can lower the point count significantly. This is tweaked to suit my needs.
Here example of how the mouse follow feels during drawing (captured in realtime during drawing)
On the Parameterization of Catmull-Rom Curves
see the formula[2]
Online Demo