Skip to content
Snippets Groups Projects
Commit 083da83f authored by Matthias Boljen's avatar Matthias Boljen
Browse files

Initial commit

parents
No related branches found
No related tags found
No related merge requests found
pkg/
share/
test/*.out
Makefile 0 → 100644
NAME=mkgrid
VERSION=0.0.1
DIRS=bin share
INSTALL_DIRS=`find $(DIRS) -type d 2>/dev/null`
INSTALL_FILES=`find $(DIRS) -type f 2>/dev/null`
DOC_FILES=$(wildcard *.md *.txt)
PKG_DIR=pkg
PKG_NAME=$(NAME)-$(VERSION)
PKG=$(PKG_DIR)/$(PKG_NAME).tar.gz
SIG=$(PKG_DIR)/$(PKG_NAME).asc
PREFIX?=/usr/local
DOC_DIR=$(PREFIX)/share/doc/$(PKG_NAME)
MAN1_DIR=share/man/man1
build: man $(PKG)
all: build $(SIG)
pkg:
mkdir -p $(PKG_DIR)
$(PKG): pkg
git archive --output=$(PKG) --prefix=$(PKG_NAME)/ HEAD
man:
mkdir -p $(MAN1_DIR)
pandoc README.md --standalone --to=man | gzip -9 > $(MAN1_DIR)/$(NAME).1.gz
sign: $(SIG)
$(SIG): $(PKG)
gpg --sign --detach-sign --armor $(PKG)
clean:
$(RM) $(MAN) $(PKG) $(SIG)
test:
$(MAKE) -C test/
tag:
git tag v$(VERSION)
git push --tags
release: $(PKG) $(SIG) tag
install:
for dir in $(INSTALL_DIRS); do mkdir -p $(PREFIX)/$$dir; done
for file in $(INSTALL_FILES); do cp $$file $(PREFIX)/$$file; done
# mkdir -p $(DOC_DIR)
# cp -r $(DOC_FILES) $(DOC_DIR)/
uninstall:
for file in $(INSTALL_FILES); do $(RM) $(PREFIX)/$$file; done
$(RM) $(DOC_DIR)
.PHONY: build sign man clean test tag release install uninstall all
# NAME
mkgrid - Convert scattered data to regular gridded data in 2D, 3D, and 4D.
# SYNOPSIS
**mkgrid** [-\-*OPTION*]
# DESCRIPTION
[add description here]
# OPTIONS
- **-i**, **-\-infile** *INFILE*
Set the input filename.
- **-o**, **-\-outfile** *OUTFILE*
Set the output filename. If undefined, results will be directed to `STDOUT`.
- **-m**, **-\-method** *METHOD*
Set interpolation method.
- **-p**, **-\-plot** [*FILENAME*]
Set filename of plot. If undefined, a plot widget will be raised.
- **-u**, **-\-usecols** *USECOLS*
Set comma-separated list of data columns to use from input file.
- **-r**, **-\-range** *RANGE*
Set comma-separated list of range specifiers for output data.
- **-s**, **-\-steps** *STEPS*
Set comma-separated list of discretization steps along each column.
# EXAMPLES
## 2D
## 3D
## 4D
# BUGS
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
Submit bug reports online: <https://gitlab.cc-asp.fraunhofer.de/mboljen/mkgrid>
# INSTALLATION
Use the following command to install this software:
```bash
$ make
$ make install
```
The default `PREFIX` is set to `/usr/local`. In order to successfully complete the installation, you need to have write permissions for the installation location.
# REQUIREMENTS
The following software pacakges are required.
- [Matplotlib][https://matplotlib.org) - Create static, animated and interactive visualizations in Python
# LICENSE
[MIT](https://choosealicense.com/licenses/mit)
#!/usr/bin/env python3
#
# Created: Mon 2024-07-15 18:40:27 CEST (boljen)
# Modified: Tue 2024-07-16 14:30:12 CEST (boljen)
#
# mkgrid:
# Convert scattered data to regular gridded data in 2D, 3D and 4D
import argparse
import warnings
import re
import sys
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from scipy.interpolate import interp1d,griddata,CubicSpline,make_interp_spline
# ============================
# Main execution function
# ============================
def execute_main():
# Available interpolation methods
method = { 'linear': "Linear interpolation",
'nearest': "Nearest data point",
'cubic': "Cubic spline interpolation",
'nearest-up': "Nearest data point (rounded up)",
'zero': "Spline interpolation of 0th order",
'slinear': "Spline interpolation of 1st order",
'quadratic': "Spline interpolation of 2nd order",
'previous': "Previous data point",
'next': "Next data point" }
# Declare parser object
parser = argparse.ArgumentParser( \
prog='mkgrid', \
description='Convert scattered data to regular gridded data in 2D, 3D and 4D')
# Add options
parser.add_argument('-i', '--infile', help='Input filename', type=str, required=True)
parser.add_argument('-o', '--outfile', help='Output filename', type=str, default=sys.stdout.buffer)
parser.add_argument('-m', '--method', help='Method', type=str, default='linear', choices=method.keys())
parser.add_argument('-p', '--plot', help='Plot filename', nargs='?', const='***', type=str, default=None)
parser.add_argument('-u', '--usecols', help='Comma-separated list of data columns to use from input file', type=str, default=None)
parser.add_argument('-r', '--range', help='Comma-separated list of range specifiers for output', type=str, default=None)
parser.add_argument('-s', '--steps', help='Comma-separated list of discretization steps', type=str, default=None)
# Parse options
args = parser.parse_args()
# Read input file
df = pd.read_fwf(args.infile)
data = df.to_dict('list')
# Initialize column list
usecols = None
# Parse option --usecols
if args.usecols is None:
# Use all available columns unless otherwise defined
usecols = list(range(0, len(df.columns)))
else:
# Use columns specified by comma-separated list only
usecols = [ x.strip() for x in args.usecols.split(',') ]
# Convert strings to integers
for i,x in enumerate(usecols):
try:
usecols[i] = int(x)-1
except:
raise ValueError('Invalid token in usecols list: integer required, received {:s}'.format(x))
# Assert valid dimension of data
if len(usecols)<2 or len(usecols)>4:
raise ValueError('Regular grid of {:d}D data not implemented yet'.format(len(usecols)))
# Assert 2D-specific interpolation method as not been assigned to 3D or 4D data
elif len(usecols)!=2 and \
(args.method=='nearest-up' or \
args.method=='zero' or \
args.method=='slinear' or \
args.method=='quadratic' or \
args.method=='previous' or \
args.method=='next'):
raise ValueError('Invalid method {:s} for 1D data'.format(args.method))
# Initialize range lists
myrange = []
# Parse option range
if args.range is not None:
# Split comma-separated list of values
tmp = [ x.strip() for x in args.range.split(',') ]
for i,x in enumerate(tmp):
# Split range specifier at colon
lo, hi = x.split(':')
# Assert lower boundary is smaller than upper boundary
if lo >= hi:
raise ValueError('Invalid token in range list: {:s} >= {:s}'.format(lo,hi))
# Assert boundary values are floating-point data
try:
myrange.append([float(lo),float(hi)])
except:
raise ValueError('Invalid token {:s} in range list'.format(x))
# Loop over available data columns
for i,x in enumerate(usecols):
# Auto-detect minimum and maximum
lo = df.iloc[:,usecols[i]].min()
hi = df.iloc[:,usecols[i]].max()
# Add unless range is defined
if i >= len(myrange):
myrange.append([lo,hi])
# Check against defined lower boundary
elif myrange[i][0] < lo:
warnings.warn('Low range {:f} is out of bounds in column {:d}'.format(myrange[i][0],usecols[i]))
# Check against defined upper boundary
elif myrange[i][1] > hi:
warnings.warn('High range {:f} is out of bounds in column {:d}'.format(myrange[i][1],usecols[i]))
# Initialize steps list
steps = []
# Parse option steps
if args.steps is not None:
# Split comma-separated list of values
tmp = [ x.strip() for x in args.steps.split(',') ]
# Convert strings to integers
for i,x in enumerate(tmp):
try:
steps.append(int(x))
except:
raise ValueError('Invalid token {:s} in steps list'.format(x))
# Loop over columns
for i,x in enumerate(usecols):
# Auto-detect array value
if i >= len(steps):
# Apply default or last element value
if i == 0:
steps.append(10)
else:
steps.append(steps[-1])
# Default labels
label = [ 'X values', 'Y values', 'Z values', 'C values' ]
# Select problem dimension
if len(usecols)==2:
# Set axis labels
label[0] = df.columns[usecols[0]]
label[1] = df.columns[usecols[1]]
# Select input data
x = df.iloc[:,usecols[0]].to_numpy()
y = df.iloc[:,usecols[1]].to_numpy()
# Initialize regular 1D grid
xi = np.linspace(myrange[0][0], myrange[0][1], steps[0]+1)
# Select linear interpolation
if args.method=='linear':
# Linear interpolation (default)
yi = np.interp(xi,x,y)
# Select cubic spline interpolation
elif args.method=='cubic':
# Cubic spline interpolation
spl = CubicSpline(x,y)
yi = spl(xi)
# Select other interpolation methods
elif args.method=='nearest' or \
args.method=='nearest-up' or \
args.method=='zero' or \
args.method=='slinear' or \
args.method=='quadratic' or \
args.method=='previous' or \
args.method=='next':
# Invoke interpolation (potentially deprecated)
f = interp1d(x,y,kind=args.method)
yi = f(xi)
# Build 2D output array
xout = []
for i,j in np.nditer([xi,yi]):
xout.append([i,j])
elif len(usecols)==3:
# Set axis labels
label[0] = df.columns[usecols[0]]
label[1] = df.columns[usecols[1]]
label[2] = df.columns[usecols[2]]
# Select input data
x = df.iloc[:,usecols[0]].to_numpy()
y = df.iloc[:,usecols[1]].to_numpy()
z = df.iloc[:,usecols[2]].to_numpy()
# Initialize regular 2D grid
xi = np.linspace(myrange[0][0], myrange[0][1], steps[0]+1)
yi = np.linspace(myrange[1][0], myrange[1][1], steps[1]+1)
# Create 2D grid interpolation
xi, yi = np.meshgrid(xi,yi)
zi = griddata(points=(x,y), values=z, xi=(xi,yi), method=args.method)
# Build 2D output array
xout = []
for i,j,k in np.nditer([xi,yi,zi]):
xout.append([i,j,k])
elif len(usecols)==4:
# Set axis labels
label[0] = df.columns[usecols[0]]
label[1] = df.columns[usecols[1]]
label[2] = df.columns[usecols[2]]
label[3] = df.columns[usecols[3]]
# Select input data
x = df.iloc[:,usecols[0]].to_numpy()
y = df.iloc[:,usecols[1]].to_numpy()
z = df.iloc[:,usecols[2]].to_numpy()
c = df.iloc[:,usecols[3]].to_numpy()
# Initialize regular 3D grid
xi = np.linspace(myrange[0][0], myrange[0][1], steps[0]+1)
yi = np.linspace(myrange[1][0], myrange[1][1], steps[1]+1)
zi = np.linspace(myrange[2][0], myrange[2][1], steps[2]+1)
# Create 3D grid interpolation
xi, yi, zi = np.meshgrid(xi,yi,zi)
ci = griddata(points=(x,y,z), values=c, xi=(xi,yi,zi), method=args.method)
# Build 2D output array
xout = []
for i,j,k,l in np.nditer([xi,yi,zi,ci]):
xout.append([i,j,k,l])
# Save regular gridded data to output file
np.savetxt(args.outfile, xout, fmt='%16.7f')
# =================
# Create plot
# =================
# Check plot option is set
if args.plot is not None:
# Check number of columns
if len(usecols)<2 or len(usecols)>4:
# Issue warning for unappropriate dimension
warnings.warn('Cannot create plot with {:d} dimensions'.format(len(df.columns)))
else:
# Check dimension
if len(usecols)==2:
# Create 2D plot
fig, ax = plt.subplots()
# Add decorations
ax.grid(which='major', color='#DDDDDD', linewidth=0.7)
ax.grid(which='minor', color='#EEEEEE', linestyle=':', linewidth=0.5)
ax.minorticks_on()
# Add labels
ax.set_xlabel(label[0], fontsize=10, labelpad=10)
ax.set_ylabel(label[1], fontsize=10, labelpad=10)
# Add data
ax.plot(xi, yi, label='Interpolated data')
ax.scatter(x, y, label='Input data')
ax.legend(loc='best')
elif len(usecols)==3:
# Create 3D plot
fig = plt.figure()
ax = fig.add_subplot(projection='3d')
# Add labels
ax.set_xlabel(label[0], fontsize=10, labelpad=10)
ax.set_ylabel(label[1], fontsize=10, labelpad=10)
ax.set_zlabel(label[2], fontsize=10, labelpad=10)
# Add data
plot = ax.plot_surface(xi, yi, zi, cmap='viridis', linewidth=0.3, edgecolor='black')
ax.scatter(x, y, z, s=4, c='black', marker='o')
# Add colorbar
fig.colorbar(plot, ax=ax, shrink=0.5, aspect=15)
elif len(usecols)==4:
# Create 4D plot
fig = plt.figure()
ax = fig.add_subplot(projection='3d')
# Add labels
ax.set_xlabel(label[0], fontsize=10, labelpad=10)
ax.set_ylabel(label[1], fontsize=10, labelpad=10)
ax.set_zlabel(label[2], fontsize=10, labelpad=10)
# Add data
img = ax.scatter(xi, yi, zi, c=ci, cmap='viridis')
ax.scatter(x, y, z, c=c, cmap='viridis', marker='+')
# Add colorbar
cbar = fig.colorbar(img, shrink=0.5, aspect=15, location='left')
cbar.ax.get_yaxis().labelpad = 15
cbar.ax.set_ylabel(df.columns[usecols[3]], rotation=270)
# Set plot title
ax.set_title(method[args.method])
# Check option value
if args.plot=='***':
# Raise widget
plt.show()
elif args.plot!=None:
# Save to specific value
fig.savefig(args.plot)
# ========================================================
# Main UX with simple information about the software
# ========================================================
# Execute the main function
execute_main()
MKGRID = ../bin/mkgrid
OUTFILES = $(addsuffix .out, testdata2 testdata3 testdata4)
default: $(OUTFILES)
testdata2.out: testdata2.csv
$(MKGRID) -i $< -o $@ -p $(subst .csv,.png,$<)
testdata3.out: testdata3.csv
$(MKGRID) -i $< -u 2,4,3 -o $@ -p $(subst .csv,.png,$<)
testdata4.out: testdata4.csv
$(MKGRID) -i $< -o $@ -p $(subst .csv,.png,$<)
clean:
$(RM) $(OUTFILES) $(subst .out,.png,$(OUTFILES))
.PHONY: clean
X Y
0.000 0.000
1.000 1.000
2.000 4.000
3.000 9.000
4.000 16.000
5.000 20.000
6.000 10.000
test/testdata2.png

44.9 KiB

TIME GL_0 PK2_0 GL_90 PK2_90
0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00
1.0000e+00 4.6856e-03 6.1530e-01 0.0000e+00 -3.0288e-02
2.0000e+00 9.5605e-03 1.5255e+00 0.0000e+00 -2.4232e-02
3.0000e+00 1.4485e-02 2.9353e+00 0.0000e+00 1.2132e-01
4.0000e+00 1.9407e-02 4.7123e+00 0.0000e+00 4.2307e-01
5.0000e+00 2.4180e-02 6.9046e+00 0.0000e+00 1.1281e+00
6.0000e+00 2.8794e-02 9.2207e+00 0.0000e+00 1.8310e+00
7.0000e+00 3.3217e-02 1.1599e+01 0.0000e+00 2.3934e+00
8.0000e+00 3.7560e-02 1.3814e+01 0.0000e+00 2.8474e+00
9.0000e+00 4.1835e-02 1.5976e+01 0.0000e+00 3.9861e+00
1.0000e+01 4.6209e-02 1.7888e+01 0.0000e+00 5.1977e+00
1.1000e+01 5.0578e-02 1.9718e+01 0.0000e+00 5.8237e+00
1.2000e+01 5.4892e-02 2.1449e+01 0.0000e+00 6.0538e+00
1.3000e+01 5.9252e-02 2.2973e+01 0.0000e+00 6.3365e+00
1.4000e+01 6.3571e-02 2.4658e+01 0.0000e+00 7.2576e+00
1.5000e+01 6.7891e-02 2.6255e+01 0.0000e+00 7.6752e+00
1.6000e+01 7.2148e-02 2.7894e+01 0.0000e+00 8.0822e+00
1.7000e+01 7.6352e-02 2.9594e+01 0.0000e+00 8.4749e+00
1.8000e+01 8.0436e-02 3.1284e+01 0.0000e+00 8.7699e+00
1.9000e+01 8.4384e-02 3.3191e+01 0.0000e+00 9.1898e+00
2.0000e+01 8.8149e-02 3.5087e+01 0.0000e+00 9.5274e+00
2.1000e+01 9.1832e-02 3.7076e+01 0.0000e+00 9.8619e+00
2.2000e+01 9.5399e-02 3.9155e+01 0.0000e+00 1.0185e+01
2.3000e+01 9.8943e-02 4.1141e+01 0.0000e+00 1.0542e+01
2.4000e+01 1.0243e-01 4.3313e+01 0.0000e+00 1.0822e+01
2.5000e+01 1.0598e-01 4.5497e+01 0.0000e+00 1.1130e+01
2.6000e+01 1.0932e-01 4.7519e+01 0.0000e+00 1.1364e+01
2.7000e+01 1.1253e-01 4.9743e+01 0.0000e+00 1.1579e+01
2.8000e+01 1.1557e-01 5.1956e+01 0.0000e+00 1.1863e+01
2.9000e+01 1.1859e-01 5.4392e+01 0.0000e+00 1.1615e+01
3.0000e+01 1.2161e-01 5.6772e+01 0.0000e+00 1.1859e+01
3.1000e+01 1.2451e-01 5.9091e+01 0.0000e+00 1.2534e+01
3.2000e+01 1.2742e-01 6.1370e+01 0.0000e+00 1.2761e+01
3.3000e+01 1.3021e-01 6.3375e+01 0.0000e+00 1.2872e+01
3.4000e+01 1.3302e-01 6.5625e+01 0.0000e+00 1.3064e+01
3.5000e+01 1.3558e-01 6.8049e+01 0.0000e+00 1.3240e+01
3.6000e+01 1.3808e-01 7.0579e+01 0.0000e+00 1.2873e+01
3.7000e+01 1.4052e-01 7.3057e+01 0.0000e+00 1.3108e+01
3.8000e+01 1.4295e-01 7.5443e+01 0.0000e+00 1.3253e+01
3.9000e+01 1.4524e-01 7.7677e+01 0.0000e+00 1.3817e+01
0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00
1.0000e+00 4.4878e-03 1.1447e+00 -3.3894e-07 2.0309e-01
2.0000e+00 9.0494e-03 2.4131e+00 5.2990e-04 4.8688e-01
3.0000e+00 1.3592e-02 4.1955e+00 1.2860e-03 9.5507e-01
4.0000e+00 1.8000e-02 6.5071e+00 2.4377e-03 2.0707e+00
5.0000e+00 2.2152e-02 9.0449e+00 3.7709e-03 3.4773e+00
6.0000e+00 2.6162e-02 1.1605e+01 5.1056e-03 5.0075e+00
7.0000e+00 3.0209e-02 1.3939e+01 6.5415e-03 6.4426e+00
8.0000e+00 3.4143e-02 1.6123e+01 7.9171e-03 7.8836e+00
9.0000e+00 3.8146e-02 1.8096e+01 9.3178e-03 9.1963e+00
1.0000e+01 4.2198e-02 1.9881e+01 1.0784e-02 1.0349e+01
1.1000e+01 4.6253e-02 2.1446e+01 1.2266e-02 1.1445e+01
1.2000e+01 5.0348e-02 2.3068e+01 1.3756e-02 1.2486e+01
1.3000e+01 5.4415e-02 2.4605e+01 1.5206e-02 1.3367e+01
1.4000e+01 5.8420e-02 2.6117e+01 1.6716e-02 1.4272e+01
1.5000e+01 6.2389e-02 2.7687e+01 1.8191e-02 1.5130e+01
1.6000e+01 6.6220e-02 2.9354e+01 1.9707e-02 1.6017e+01
1.7000e+01 6.9944e-02 3.0964e+01 2.1217e-02 1.6821e+01
1.8000e+01 7.3495e-02 3.2712e+01 2.2717e-02 1.7612e+01
1.9000e+01 7.6951e-02 3.4345e+01 2.4219e-02 1.8265e+01
2.0000e+01 8.0381e-02 3.6167e+01 2.5701e-02 1.8974e+01
2.1000e+01 8.3751e-02 3.7931e+01 2.7202e-02 1.9654e+01
2.2000e+01 8.7057e-02 3.9733e+01 2.8685e-02 2.0293e+01
2.3000e+01 9.0429e-02 4.1672e+01 3.0125e-02 2.0957e+01
2.4000e+01 9.3723e-02 4.3647e+01 3.1602e-02 2.1624e+01
2.5000e+01 9.7037e-02 4.5719e+01 3.3050e-02 2.2303e+01
2.6000e+01 1.0005e-01 4.7713e+01 3.4508e-02 2.2930e+01
2.7000e+01 1.0300e-01 4.9853e+01 3.5923e-02 2.3675e+01
2.8000e+01 1.0599e-01 5.1925e+01 3.7365e-02 2.4333e+01
2.9000e+01 1.0885e-01 5.4128e+01 3.8755e-02 2.5005e+01
3.0000e+01 1.1161e-01 5.6209e+01 4.0161e-02 2.5710e+01
3.1000e+01 1.1435e-01 5.8428e+01 4.1494e-02 2.6402e+01
3.2000e+01 1.1693e-01 6.0522e+01 4.2895e-02 2.7147e+01
3.3000e+01 1.1949e-01 6.2698e+01 4.4244e-02 2.7812e+01
3.4000e+01 1.2204e-01 6.4932e+01 4.5583e-02 2.8572e+01
3.5000e+01 1.2468e-01 6.7268e+01 4.6877e-02 2.9338e+01
3.6000e+01 1.2728e-01 6.9573e+01 4.8137e-02 3.0103e+01
3.7000e+01 1.2959e-01 7.1828e+01 4.9428e-02 3.0810e+01
3.8000e+01 1.3173e-01 7.3880e+01 5.0669e-02 3.1540e+01
3.9000e+01 1.3378e-01 7.6073e+01 5.1905e-02 3.2294e+01
0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00
1.0000e+00 4.2477e-03 2.1273e+00 4.4526e-03 2.4461e+00
2.0000e+00 8.5251e-03 5.4903e+00 8.8999e-03 6.2740e+00
3.0000e+00 1.2562e-02 8.9212e+00 1.3221e-02 1.0191e+01
4.0000e+00 1.6592e-02 1.2106e+01 1.7503e-02 1.3679e+01
5.0000e+00 2.0742e-02 1.4840e+01 2.1818e-02 1.6449e+01
6.0000e+00 2.5036e-02 1.7043e+01 2.6231e-02 1.8764e+01
7.0000e+00 2.9455e-02 1.8879e+01 3.0654e-02 2.0622e+01
8.0000e+00 3.3901e-02 2.0541e+01 3.5142e-02 2.2358e+01
9.0000e+00 3.8376e-02 2.2243e+01 3.9624e-02 2.4073e+01
1.0000e+01 4.2808e-02 2.3841e+01 4.4056e-02 2.5860e+01
1.1000e+01 4.7117e-02 2.5528e+01 4.8399e-02 2.7794e+01
1.2000e+01 5.1330e-02 2.7258e+01 5.2647e-02 2.9727e+01
1.3000e+01 5.5313e-02 2.8930e+01 5.6747e-02 3.1745e+01
1.4000e+01 5.9154e-02 3.0732e+01 6.0730e-02 3.3935e+01
1.5000e+01 6.2784e-02 3.2626e+01 6.4535e-02 3.6120e+01
1.6000e+01 6.6342e-02 3.4513e+01 6.8247e-02 3.8384e+01
1.7000e+01 6.9787e-02 3.6535e+01 7.1925e-02 4.0760e+01
1.8000e+01 7.3349e-02 3.8600e+01 7.5531e-02 4.3169e+01
1.9000e+01 7.6978e-02 4.0669e+01 7.8996e-02 4.5475e+01
2.0000e+01 8.0637e-02 4.2910e+01 8.2373e-02 4.7977e+01
2.1000e+01 8.4093e-02 4.5128e+01 8.5631e-02 5.0561e+01
2.2000e+01 8.7293e-02 4.7370e+01 8.8823e-02 5.3047e+01
2.3000e+01 9.0194e-02 4.9683e+01 9.1872e-02 5.5591e+01
2.4000e+01 9.3140e-02 5.2012e+01 9.4642e-02 5.8141e+01
2.5000e+01 9.6145e-02 5.4422e+01 9.7350e-02 6.0745e+01
2.6000e+01 9.9313e-02 5.6789e+01 1.0002e-01 6.3353e+01
2.7000e+01 1.0245e-01 5.9315e+01 1.0279e-01 6.5985e+01
2.8000e+01 1.0536e-01 6.1662e+01 1.0552e-01 6.8542e+01
2.9000e+01 1.0800e-01 6.4019e+01 1.0820e-01 7.1164e+01
3.0000e+01 1.1043e-01 6.6240e+01 1.1065e-01 7.3760e+01
3.1000e+01 1.1284e-01 6.8501e+01 1.1321e-01 7.6374e+01
3.2000e+01 1.1549e-01 7.0963e+01 1.1567e-01 7.9016e+01
3.3000e+01 1.1812e-01 7.3478e+01 1.1793e-01 8.1708e+01
3.4000e+01 1.2058e-01 7.5915e+01 1.2011e-01 8.4374e+01
3.5000e+01 1.2286e-01 7.8266e+01 1.2245e-01 8.7016e+01
3.6000e+01 1.2496e-01 8.0551e+01 1.2484e-01 8.9754e+01
3.7000e+01 1.2714e-01 8.2882e+01 1.2731e-01 9.2680e+01
3.8000e+01 1.2958e-01 8.5428e+01 1.2976e-01 9.5547e+01
3.9000e+01 1.3181e-01 8.7946e+01 1.3209e-01 9.8415e+01
0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00
1.0000e+00 1.4401e-03 1.0571e+00 4.3294e-03 1.5169e+00
2.0000e+00 2.7341e-03 2.7518e+00 8.5858e-03 3.8222e+00
3.0000e+00 4.0221e-03 4.6409e+00 1.2670e-02 6.7878e+00
4.0000e+00 5.3331e-03 6.4468e+00 1.6708e-02 9.6872e+00
5.0000e+00 6.6701e-03 8.0348e+00 2.0789e-02 1.2446e+01
6.0000e+00 8.0216e-03 9.5222e+00 2.4792e-02 1.4816e+01
7.0000e+00 9.3682e-03 1.0831e+01 2.8851e-02 1.6885e+01
8.0000e+00 1.0778e-02 1.2049e+01 3.3018e-02 1.8686e+01
9.0000e+00 1.2201e-02 1.3007e+01 3.7194e-02 2.0273e+01
1.0000e+01 1.3658e-02 1.3991e+01 4.1344e-02 2.1860e+01
1.1000e+01 1.5112e-02 1.4860e+01 4.5529e-02 2.3310e+01
1.2000e+01 1.6578e-02 1.5743e+01 4.9711e-02 2.4846e+01
1.3000e+01 1.8034e-02 1.6614e+01 5.3837e-02 2.6460e+01
1.4000e+01 1.9538e-02 1.7408e+01 5.7857e-02 2.8183e+01
1.5000e+01 2.0998e-02 1.8219e+01 6.1788e-02 2.9944e+01
1.6000e+01 2.2471e-02 1.8954e+01 6.5669e-02 3.1742e+01
1.7000e+01 2.3950e-02 1.9711e+01 6.9458e-02 3.3615e+01
1.8000e+01 2.5400e-02 2.0391e+01 7.3216e-02 3.5613e+01
1.9000e+01 2.6841e-02 2.1098e+01 7.6933e-02 3.7628e+01
2.0000e+01 2.8307e-02 2.1780e+01 8.0484e-02 3.9610e+01
2.1000e+01 2.9760e-02 2.2477e+01 8.3989e-02 4.1745e+01
2.2000e+01 3.1172e-02 2.3140e+01 8.7355e-02 4.3815e+01
2.3000e+01 3.2586e-02 2.3732e+01 9.0690e-02 4.5965e+01
2.4000e+01 3.3984e-02 2.4396e+01 9.3915e-02 4.8074e+01
2.5000e+01 3.5344e-02 2.5030e+01 9.7006e-02 5.0252e+01
2.6000e+01 3.6649e-02 2.5805e+01 1.0004e-01 5.2612e+01
2.7000e+01 3.7982e-02 2.6537e+01 1.0303e-01 5.4869e+01
2.8000e+01 3.9224e-02 2.7221e+01 1.0591e-01 5.7123e+01
2.9000e+01 4.0452e-02 2.7913e+01 1.0885e-01 5.9496e+01
3.0000e+01 4.1678e-02 2.8615e+01 1.1173e-01 6.1879e+01
3.1000e+01 4.2892e-02 2.9356e+01 1.1458e-01 6.4301e+01
3.2000e+01 4.4097e-02 3.0105e+01 1.1733e-01 6.6747e+01
3.3000e+01 4.5274e-02 3.0886e+01 1.1991e-01 6.9109e+01
3.4000e+01 4.6452e-02 3.1549e+01 1.2243e-01 7.1503e+01
3.5000e+01 4.7603e-02 3.2406e+01 1.2494e-01 7.4067e+01
3.6000e+01 4.8765e-02 3.3065e+01 1.2736e-01 7.6438e+01
3.7000e+01 4.9941e-02 3.3818e+01 1.2969e-01 7.8794e+01
3.8000e+01 5.1138e-02 3.4572e+01 1.3200e-01 8.1256e+01
3.9000e+01 5.1628e-02 3.4542e+01 1.3227e-01 7.8680e+01
0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00
1.0000e+00 0.0000e+00 7.0364e-01 4.3878e-03 1.7640e+00
2.0000e+00 0.0000e+00 8.7403e-01 9.1154e-03 3.8336e+00
3.0000e+00 0.0000e+00 2.1732e+00 1.3828e-02 6.4112e+00
4.0000e+00 0.0000e+00 4.1045e+00 1.8465e-02 9.2378e+00
5.0000e+00 0.0000e+00 5.5689e+00 2.2996e-02 1.1826e+01
6.0000e+00 0.0000e+00 6.5673e+00 2.7549e-02 1.4313e+01
7.0000e+00 0.0000e+00 7.4303e+00 3.2082e-02 1.6464e+01
8.0000e+00 0.0000e+00 8.1184e+00 3.6627e-02 1.8393e+01
9.0000e+00 0.0000e+00 8.6834e+00 4.1164e-02 2.0042e+01
1.0000e+01 0.0000e+00 8.7020e+00 4.5814e-02 2.1648e+01
1.1000e+01 0.0000e+00 9.1453e+00 5.0358e-02 2.3263e+01
1.2000e+01 0.0000e+00 9.5366e+00 5.4817e-02 2.4832e+01
1.3000e+01 0.0000e+00 9.9260e+00 5.9276e-02 2.6500e+01
1.4000e+01 0.0000e+00 1.0809e+01 6.3558e-02 2.8333e+01
1.5000e+01 0.0000e+00 1.1204e+01 6.7836e-02 3.0203e+01
1.6000e+01 0.0000e+00 1.1650e+01 7.1976e-02 3.2107e+01
1.7000e+01 0.0000e+00 1.1958e+01 7.6094e-02 3.4151e+01
1.8000e+01 0.0000e+00 1.2354e+01 8.0075e-02 3.6295e+01
1.9000e+01 0.0000e+00 1.2651e+01 8.3975e-02 3.8460e+01
2.0000e+01 0.0000e+00 1.3014e+01 8.7775e-02 4.0620e+01
2.1000e+01 0.0000e+00 1.3370e+01 9.1467e-02 4.2994e+01
2.2000e+01 0.0000e+00 1.3651e+01 9.5055e-02 4.5246e+01
2.3000e+01 0.0000e+00 1.3974e+01 9.8546e-02 4.7602e+01
2.4000e+01 0.0000e+00 1.4208e+01 1.0198e-01 5.0054e+01
2.5000e+01 0.0000e+00 1.4426e+01 1.0525e-01 5.2506e+01
2.6000e+01 0.0000e+00 1.4729e+01 1.0841e-01 5.4930e+01
2.7000e+01 0.0000e+00 1.4866e+01 1.1157e-01 5.7407e+01
2.8000e+01 0.0000e+00 1.5056e+01 1.1456e-01 5.9965e+01
2.9000e+01 0.0000e+00 1.5240e+01 1.1748e-01 6.2441e+01
3.0000e+01 0.0000e+00 1.5499e+01 1.2033e-01 6.5041e+01
3.1000e+01 0.0000e+00 1.5684e+01 1.2320e-01 6.7720e+01
3.2000e+01 0.0000e+00 1.5817e+01 1.2603e-01 7.0342e+01
3.3000e+01 0.0000e+00 1.5977e+01 1.2890e-01 7.2873e+01
3.4000e+01 0.0000e+00 1.6163e+01 1.3163e-01 7.5614e+01
3.5000e+01 0.0000e+00 1.6302e+01 1.3427e-01 7.8228e+01
3.6000e+01 0.0000e+00 1.6441e+01 1.3672e-01 8.0876e+01
3.7000e+01 0.0000e+00 1.6610e+01 1.3911e-01 8.3589e+01
3.8000e+01 0.0000e+00 1.6723e+01 1.4139e-01 8.6106e+01
3.9000e+01 0.0000e+00 1.6854e+01 1.4364e-01 8.8666e+01
test/testdata3.png

88.3 KiB

X Y Z T
0.000 0.000 10.000 10.0
0.000 0.000 -10.000 10.0
5.000 0.000 8.660 10.0
8.660 0.000 5.000 10.0
10.000 0.000 0.000 10.0
8.660 0.000 -5.000 10.0
5.000 0.000 -8.660 10.0
4.330 2.500 8.660 20.0
7.500 4.330 5.000 20.0
8.660 5.000 0.000 20.0
7.500 4.330 -5.000 20.0
4.330 2.500 -8.660 20.0
2.500 4.330 8.660 30.0
4.330 7.500 5.000 30.0
5.000 8.660 0.000 30.0
4.330 7.500 -5.000 30.0
2.500 4.330 -8.660 30.0
0.000 5.000 8.660 30.0
0.000 8.660 5.000 30.0
0.000 10.000 0.000 30.0
0.000 8.660 5.000 30.0
0.000 5.000 8.660 30.0
-2.500 4.330 8.660 20.0
-4.330 7.500 5.000 20.0
-5.000 8.660 0.000 20.0
-4.330 7.500 -5.000 20.0
-2.500 4.330 -8.660 20.0
-4.330 2.500 8.660 10.0
-7.500 4.330 5.000 10.0
-8.660 5.000 0.000 10.0
-7.500 4.330 -5.000 10.0
-4.330 2.500 -8.660 10.0
-5.000 0.000 8.660 0.0
-8.660 0.000 5.000 0.0
-10.000 0.000 0.000 0.0
-8.660 0.000 -5.000 0.0
-5.000 0.000 -8.660 0.0
-4.330 -2.500 8.660 0.0
-7.500 -4.330 5.000 0.0
-8.660 -5.000 0.000 0.0
-7.500 -4.330 -5.000 0.0
-4.330 -2.500 -8.660 0.0
-2.500 -4.330 8.660 0.0
-4.330 -7.500 5.000 0.0
-5.000 -8.660 0.000 0.0
-4.330 -7.500 -5.000 0.0
-2.500 -4.330 -8.660 0.0
0.000 -5.000 8.660 0.0
0.000 -8.660 5.000 0.0
0.000 -10.000 0.000 0.0
0.000 -8.660 -5.000 0.0
0.000 -5.000 -8.660 0.0
2.500 -4.330 8.660 0.0
4.330 -7.500 5.000 0.0
5.000 -8.660 0.000 0.0
4.330 -7.500 -5.000 0.0
2.500 -4.330 -8.660 0.0
4.330 -2.500 8.660 0.0
7.500 -4.330 5.000 0.0
8.660 -5.000 0.000 0.0
7.500 -4.330 -5.000 0.0
4.330 -2.500 -8.660 0.0
test/testdata4.png

109 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment