summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authora1xd <[email protected]>2021-09-18 05:20:53 -0400
committera1xd <[email protected]>2021-09-23 22:36:18 -0400
commit115030165d539fde5440f6232879c7a076dea2ec (patch)
tree89f50a3f38b6b9052fa5085e36a2d00577805e43
parentAdd power start from one (diff)
downloadrawaccel-115030165d539fde5440f6232879c7a076dea2ec.tar.xz
rawaccel-115030165d539fde5440f6232879c7a076dea2ec.zip
generalize power start-from-1
starting output is determined by (gain) offset
-rw-r--r--common/accel-classic.hpp14
-rw-r--r--common/accel-natural.hpp2
-rw-r--r--common/accel-power.hpp225
-rw-r--r--common/rawaccel-base.hpp5
-rw-r--r--common/rawaccel-validate.hpp15
-rw-r--r--grapher/Form1.Designer.cs255
-rw-r--r--grapher/Form1.cs26
-rw-r--r--grapher/Layouts/ClassicLayout.cs4
-rw-r--r--grapher/Layouts/DefaultLayout.cs4
-rw-r--r--grapher/Layouts/JumpLayout.cs4
-rw-r--r--grapher/Layouts/LUTLayout.cs4
-rw-r--r--grapher/Layouts/LayoutBase.cs28
-rw-r--r--grapher/Layouts/LinearLayout.cs4
-rw-r--r--grapher/Layouts/MotivityLayout.cs4
-rw-r--r--grapher/Layouts/NaturalLayout.cs4
-rw-r--r--grapher/Layouts/OffLayout.cs4
-rw-r--r--grapher/Layouts/PowerLayout.cs4
-rw-r--r--grapher/Layouts/UnsupportedLayout.cs4
-rw-r--r--grapher/Models/AccelGUIFactory.cs82
-rw-r--r--grapher/Models/Options/AccelTypeOptions.cs32
-rw-r--r--wrapper/wrapper.cpp4
21 files changed, 317 insertions, 411 deletions
diff --git a/common/accel-classic.hpp b/common/accel-classic.hpp
index c230bb4..ca0651c 100644
--- a/common/accel-classic.hpp
+++ b/common/accel-classic.hpp
@@ -11,13 +11,13 @@ namespace rawaccel {
struct classic_base {
double base_fn(double x, double accel_raised, const accel_args& args) const
{
- return accel_raised * pow(x - args.offset, args.exponent_classic) / x;
+ return accel_raised * pow(x - args.input_offset, args.exponent_classic) / x;
}
static double base_accel(double x, double y, const accel_args& args)
{
auto power = args.exponent_classic;
- return pow(x * y * pow(x - args.offset, -power), 1 / (power - 1));
+ return pow(x * y * pow(x - args.input_offset, -power), 1 / (power - 1));
}
};
@@ -70,7 +70,7 @@ namespace rawaccel {
double operator()(double x, const accel_args& args) const
{
- if (x <= args.offset) return 1;
+ if (x <= args.input_offset) return 1;
return sign * minsd(base_fn(x, accel_raised, args), cap) + 1;
}
@@ -96,7 +96,7 @@ namespace rawaccel {
}
{
- double a = gain_accel(cap.x, cap.y, args.exponent_classic, args.offset);
+ double a = gain_accel(cap.x, cap.y, args.exponent_classic, args.input_offset);
accel_raised = pow(a, args.exponent_classic - 1);
}
constant = (base_fn(cap.x, accel_raised, args) - cap.y) * cap.x;
@@ -105,7 +105,7 @@ namespace rawaccel {
accel_raised = pow(args.acceleration, args.exponent_classic - 1);
if (args.cap.x > 0) {
cap.x = args.cap.x;
- cap.y = gain(cap.x, args.acceleration, args.exponent_classic, args.offset);
+ cap.y = gain(cap.x, args.acceleration, args.exponent_classic, args.input_offset);
constant = (base_fn(cap.x, accel_raised, args) - cap.y) * cap.x;
}
break;
@@ -121,7 +121,7 @@ namespace rawaccel {
sign = -sign;
}
- cap.x = gain_inverse(cap.y, args.acceleration, args.exponent_classic, args.offset);
+ cap.x = gain_inverse(cap.y, args.acceleration, args.exponent_classic, args.input_offset);
constant = (base_fn(cap.x, accel_raised, args) - cap.y) * cap.x;
}
break;
@@ -132,7 +132,7 @@ namespace rawaccel {
{
double output;
- if (x <= args.offset) return 1;
+ if (x <= args.input_offset) return 1;
if (x < cap.x) {
output = base_fn(x, accel_raised, args);
diff --git a/common/accel-natural.hpp b/common/accel-natural.hpp
index 6f30a38..9d615a9 100644
--- a/common/accel-natural.hpp
+++ b/common/accel-natural.hpp
@@ -11,7 +11,7 @@ namespace rawaccel {
double limit;
natural_base(const accel_args& args) :
- offset(args.offset),
+ offset(args.input_offset),
limit(args.limit - 1)
{
accel = args.decay_rate / fabs(limit);
diff --git a/common/accel-power.hpp b/common/accel-power.hpp
index 014acae..ffbadb0 100644
--- a/common/accel-power.hpp
+++ b/common/accel-power.hpp
@@ -7,10 +7,66 @@
namespace rawaccel {
struct power_base {
- static double base_fn(double x, double scale, const accel_args& args)
+ vec2d offset;
+ double scale;
+ double constant;
+
+ power_base(const accel_args& args)
+ {
+ auto n = args.exponent_power;
+
+ if (args.cap_mode != classic_cap_mode::io) {
+ scale = args.scale;
+ }
+ else if (args.gain) {
+ scale = scale_from_gain_point(args.cap.x, args.cap.y, n);
+ }
+ else {
+ /*
+ * special case for legacy + io cap mode
+ *
+ * offset is ignored because of the circular dependency:
+ * scale -> constant -> offset
+ */
+ offset = {};
+ constant = 0;
+ scale = scale_from_sens_point(args.cap.x, args.cap.y, n, constant);
+ return;
+ }
+
+ offset.x = gain_inverse(args.output_offset, n, scale);
+ offset.y = args.output_offset;
+ constant = offset.x * offset.y * n / (n + 1);
+ }
+
+ double base_fn(double x, const accel_args& args) const
{
- // f(x) = w(mx)^k
- return pow(scale * x, args.exponent_power);
+ if (x <= offset.x) {
+ return offset.y;
+ }
+ else {
+ return pow(scale * x, args.exponent_power) + constant / x;
+ }
+ }
+
+ static double gain(double input, double power, double scale)
+ {
+ return (power + 1) * pow(input * scale, power);
+ }
+
+ static double gain_inverse(double gain, double power, double scale)
+ {
+ return pow(gain / (power + 1), 1 / power) / scale;
+ }
+
+ static double scale_from_gain_point(double input, double gain, double power)
+ {
+ return pow(gain / (power + 1), 1 / power) / input;
+ }
+
+ static double scale_from_sens_point(double input, double sens, double power, double C)
+ {
+ return pow(sens - C / input, 1 / power) / input;
}
};
@@ -19,88 +75,44 @@ namespace rawaccel {
template <>
struct power<LEGACY> : power_base {
double cap = DBL_MAX;
- double scale = 0;
- power(const accel_args& args)
+ power(const accel_args& args) :
+ power_base(args)
{
- // Note that cap types may overwrite scale below.
- scale = args.scale;
switch (args.cap_mode){
- case classic_cap_mode::in:
- if (args.cap.x > 0)
- {
- cap = base_fn(
- args.cap.x,
- args.scale,
- args);
- }
- break;
case classic_cap_mode::io:
- if (args.cap.x > 0 &&
- args.cap.y > 1)
- {
- cap = args.cap.y;
- scale = scale_from_sens_point(
- args.cap.y,
- args.cap.x,
- args.exponent_power);
- }
+ cap = args.cap.y;
+ break;
+ case classic_cap_mode::in:
+ if (args.cap.x > 0) cap = base_fn(args.cap.x, args);
break;
case classic_cap_mode::out:
default:
- if (args.cap.y > 1)
- {
- cap = args.cap.y;
- }
+ if (args.cap.y > 0) cap = args.cap.y;
break;
}
- /*
- if (args.cap.x > 0) {
- cap.x = args.cap.x;
- cap.y = base_fn(cap.x, args);
- }
- */
}
double operator()(double speed, const accel_args& args) const
{
- if (args.powerStartFromOne) {
- return minsd(maxsd(base_fn(speed, scale, args), 1), cap);
- }
- else {
- return minsd(base_fn(speed, scale, args), cap);
- }
+ return minsd(base_fn(speed, args), cap);
}
- double static scale_from_sens_point(double sens, double input, double power)
- {
- return pow(sens, 1 / power) / input;
- }
};
template <>
struct power<GAIN> : power_base {
vec2d cap = { DBL_MAX, DBL_MAX };
- double constant = 0;
- double scale = 0;
- vec2d startFromOne{ 0, 0 };
+ double constant_b;
- power(const accel_args& args)
+ power(const accel_args& args) :
+ power_base(args)
{
- /*
- if (args.cap.x > 0) {
- cap.x = args.cap.x;
- double output = base_fn(cap.x, args);
- cap.y = output * (args.exponent_power + 1);
- constant = -args.exponent_power * output * args.cap.x;
- }
- */
-
- // Note that cap types may overwrite this below.
- scale = args.scale;
-
switch (args.cap_mode) {
+ case classic_cap_mode::io:
+ cap = args.cap;
+ break;
case classic_cap_mode::in:
if (args.cap.x > 0) {
cap.x = args.cap.x;
@@ -110,111 +122,32 @@ namespace rawaccel {
scale);
}
break;
- case classic_cap_mode::io:
- if (args.cap.x > 0 &&
- args.cap.y > 1) {
- cap.x = args.cap.x;
- cap.y = args.cap.y;
- scale = scale_from_gain_point(
- args.cap.x,
- args.cap.y,
- args.exponent_power);
- }
- break;
case classic_cap_mode::out:
default:
- if (args.cap.y > 1) {
- cap.y = args.cap.y;
+ if (args.cap.y > 0) {
cap.x = gain_inverse(
args.cap.y,
args.exponent_power,
scale);
+ cap.y = args.cap.y;
}
break;
}
- if (args.powerStartFromOne)
- {
- startFromOne.x = gain_inverse(
- 1,
- args.exponent_power,
- scale);
- startFromOne.y = -1 * integration_constant(startFromOne.x,
- 1,
- base_fn(startFromOne.x, scale, args));
- }
-
- if (cap.x < DBL_MAX && cap.y < DBL_MAX)
- {
- if (args.powerStartFromOne) {
- constant = integration_constant(
- cap.x,
- cap.y,
- startFromOneOutput(
- startFromOne,
- cap.x,
- scale,
- args));
- }
- else {
- constant = integration_constant(
- cap.x,
- cap.y,
- base_fn(cap.x, scale, args));
- }
- }
-
+ constant_b = integration_constant(cap.x, cap.y, base_fn(cap.x, args));
}
double operator()(double speed, const accel_args& args) const
{
if (speed < cap.x) {
- if (args.powerStartFromOne) {
- return startFromOneOutput(
- startFromOne,
- speed,
- scale,
- args);
- }
- else {
- return base_fn(speed, scale, args);
- }
+ return base_fn(speed, args);
}
else {
- return cap.y + constant / speed;
- }
- }
-
- double static startFromOneOutput(
- const vec2d& startFromOne,
- double speed,
- double scale,
- const accel_args& args)
- {
- if (speed > startFromOne.x) {
- return base_fn(speed, scale, args) + startFromOne.y / speed;
- }
- else
- {
- return 1;
+ return cap.y + constant_b / speed;
}
}
- double static gain_inverse(double gain, double power, double scale)
- {
- return pow(gain / (power + 1), 1 / power) / scale;
- }
- double static gain(double input, double power, double scale)
- {
- return (power + 1) * pow(input * scale, power);
- }
-
- double static scale_from_gain_point(double input, double gain, double power)
- {
- return pow(gain / (power + 1), 1 / power) / input;
- }
-
- double static integration_constant(double input, double gain, double output)
+ static double integration_constant(double input, double gain, double output)
{
return (output - gain) * input;
}
diff --git a/common/rawaccel-base.hpp b/common/rawaccel-base.hpp
index 08d42c6..cee1a3e 100644
--- a/common/rawaccel-base.hpp
+++ b/common/rawaccel-base.hpp
@@ -42,7 +42,8 @@ namespace rawaccel {
accel_mode mode = accel_mode::noaccel;
bool gain = 1;
- double offset = 0;
+ double input_offset = 0;
+ double output_offset = 0;
double acceleration = 0.005;
double decay_rate = 0.1;
double growth_rate = 1;
@@ -53,7 +54,7 @@ namespace rawaccel {
double limit = 1.5;
double midpoint = 5;
double smooth = 0.5;
- bool powerStartFromOne = true;
+
vec2d cap = { 15, 1.5 };
classic_cap_mode cap_mode = classic_cap_mode::out;
diff --git a/common/rawaccel-validate.hpp b/common/rawaccel-validate.hpp
index a88d514..23deb5f 100644
--- a/common/rawaccel-validate.hpp
+++ b/common/rawaccel-validate.hpp
@@ -50,16 +50,20 @@ namespace rawaccel {
error("data size > max");
}
- if (args.offset < 0) {
+ if (args.input_offset < 0) {
error("offset can not be negative");
}
- else if (args.mode == accel_mode::jump && args.offset == 0) {
+ else if (args.mode == accel_mode::jump && args.input_offset == 0) {
error("offset can not be 0");
}
+ if (args.output_offset < 0) {
+ error("offset can not be negative");
+ }
+
bool jump_or_io_cap =
(args.mode == accel_mode::jump ||
- (args.mode == accel_mode::classic &&
+ ((args.mode == accel_mode::classic || args.mode == accel_mode::power) &&
args.cap_mode == classic_cap_mode::io));
if (args.cap.x < 0) {
@@ -76,6 +80,11 @@ namespace rawaccel {
error("cap (output) can not be 0");
}
+ if (args.cap.x > 0 && args.cap.x < args.input_offset ||
+ args.cap.y > 0 && args.cap.y < args.output_offset) {
+ error("cap < offset");
+ }
+
if (args.growth_rate <= 0 ||
args.decay_rate <= 0 ||
args.acceleration <= 0) {
diff --git a/grapher/Form1.Designer.cs b/grapher/Form1.Designer.cs
index 6905de1..4625bca 100644
--- a/grapher/Form1.Designer.cs
+++ b/grapher/Form1.Designer.cs
@@ -71,12 +71,6 @@ namespace grapher
System.Windows.Forms.DataVisualization.Charting.Title title6 = new System.Windows.Forms.DataVisualization.Charting.Title();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RawAcceleration));
this.optionsPanel = new System.Windows.Forms.Panel();
- this.powerStartsFromOneBoxY = new System.Windows.Forms.CheckBox();
- this.powerStartsFromZeroBoxY = new System.Windows.Forms.CheckBox();
- this.powerStartsFromOneBoxX = new System.Windows.Forms.CheckBox();
- this.powerStartsFromZeroBoxX = new System.Windows.Forms.CheckBox();
- this.powerStartFromLabelY = new System.Windows.Forms.Label();
- this.powerStartFromLabelX = new System.Windows.Forms.Label();
this.OutCapActiveYLabelPower = new System.Windows.Forms.Label();
this.InCapActiveYLabelPower = new System.Windows.Forms.Label();
this.OutCapActiveXLabelPower = new System.Windows.Forms.Label();
@@ -188,22 +182,26 @@ namespace grapher
this.OptionSetXTitle = new System.Windows.Forms.Label();
this.constantThreeLabelY = new System.Windows.Forms.Label();
this.limitLabelY = new System.Windows.Forms.Label();
- this.offsetLabelY = new System.Windows.Forms.Label();
+ this.inputOffsetLabelY = new System.Windows.Forms.Label();
+ this.outputOffsetLabelY = new System.Windows.Forms.Label();
this.inCapLabelYClassic = new System.Windows.Forms.Label();
this.constantOneLabelY = new System.Windows.Forms.Label();
this.ByComponentXYLock = new System.Windows.Forms.CheckBox();
this.MidpointActiveYLabel = new System.Windows.Forms.Label();
this.LimitActiveYLabel = new System.Windows.Forms.Label();
- this.OffsetActiveYLabel = new System.Windows.Forms.Label();
+ this.InputOffsetActiveYLabel = new System.Windows.Forms.Label();
+ this.OutputOffsetActiveYLabel = new System.Windows.Forms.Label();
this.AccelerationActiveLabelY = new System.Windows.Forms.Label();
this.accelTypeDropY = new System.Windows.Forms.ComboBox();
this.midpointBoxY = new System.Windows.Forms.TextBox();
this.limitBoxY = new System.Windows.Forms.TextBox();
- this.offsetBoxY = new System.Windows.Forms.TextBox();
+ this.inputOffsetBoxY = new System.Windows.Forms.TextBox();
+ this.outputOffsetBoxY = new System.Windows.Forms.TextBox();
this.accelerationBoxY = new System.Windows.Forms.TextBox();
this.MidpointActiveXLabel = new System.Windows.Forms.Label();
this.LimitActiveXLabel = new System.Windows.Forms.Label();
- this.OffsetActiveXLabel = new System.Windows.Forms.Label();
+ this.InputOffsetActiveXLabel = new System.Windows.Forms.Label();
+ this.OutputOffsetActiveXLabel = new System.Windows.Forms.Label();
this.InCapActiveYLabelClassic = new System.Windows.Forms.Label();
this.InCapActiveXLabelClassic = new System.Windows.Forms.Label();
this.AccelerationActiveLabelX = new System.Windows.Forms.Label();
@@ -218,8 +216,10 @@ namespace grapher
this.inCapBoxYClassic = new System.Windows.Forms.TextBox();
this.VertHorzRatioBox = new System.Windows.Forms.TextBox();
this.writeButton = new System.Windows.Forms.Button();
- this.offsetLabelX = new System.Windows.Forms.Label();
- this.offsetBoxX = new System.Windows.Forms.TextBox();
+ this.inputOffsetLabelX = new System.Windows.Forms.Label();
+ this.outputOffsetLabelX = new System.Windows.Forms.Label();
+ this.inputOffsetBoxX = new System.Windows.Forms.TextBox();
+ this.outputOffsetBoxX = new System.Windows.Forms.TextBox();
this.constantThreeLabelX = new System.Windows.Forms.Label();
this.midpointBoxX = new System.Windows.Forms.TextBox();
this.limitLabelX = new System.Windows.Forms.Label();
@@ -254,8 +254,6 @@ namespace grapher
this.GainChart = new System.Windows.Forms.DataVisualization.Charting.Chart();
this.VelocityChart = new System.Windows.Forms.DataVisualization.Charting.Chart();
this.AccelerationChart = new System.Windows.Forms.DataVisualization.Charting.Chart();
- this.powerStartFromActiveLabelX = new System.Windows.Forms.Label();
- this.powerStartFromActiveLabelY = new System.Windows.Forms.Label();
this.optionsPanel.SuspendLayout();
this.DirectionalityPanel.SuspendLayout();
this.menuStrip1.SuspendLayout();
@@ -271,14 +269,6 @@ namespace grapher
// optionsPanel
//
this.optionsPanel.AutoSize = true;
- this.optionsPanel.Controls.Add(this.powerStartFromActiveLabelY);
- this.optionsPanel.Controls.Add(this.powerStartFromActiveLabelX);
- this.optionsPanel.Controls.Add(this.powerStartsFromOneBoxY);
- this.optionsPanel.Controls.Add(this.powerStartsFromZeroBoxY);
- this.optionsPanel.Controls.Add(this.powerStartsFromOneBoxX);
- this.optionsPanel.Controls.Add(this.powerStartsFromZeroBoxX);
- this.optionsPanel.Controls.Add(this.powerStartFromLabelY);
- this.optionsPanel.Controls.Add(this.powerStartFromLabelX);
this.optionsPanel.Controls.Add(this.OutCapActiveYLabelPower);
this.optionsPanel.Controls.Add(this.InCapActiveYLabelPower);
this.optionsPanel.Controls.Add(this.OutCapActiveXLabelPower);
@@ -371,22 +361,26 @@ namespace grapher
this.optionsPanel.Controls.Add(this.OptionSetXTitle);
this.optionsPanel.Controls.Add(this.constantThreeLabelY);
this.optionsPanel.Controls.Add(this.limitLabelY);
- this.optionsPanel.Controls.Add(this.offsetLabelY);
+ this.optionsPanel.Controls.Add(this.inputOffsetLabelY);
+ this.optionsPanel.Controls.Add(this.outputOffsetLabelY);
this.optionsPanel.Controls.Add(this.inCapLabelYClassic);
this.optionsPanel.Controls.Add(this.constantOneLabelY);
this.optionsPanel.Controls.Add(this.ByComponentXYLock);
this.optionsPanel.Controls.Add(this.MidpointActiveYLabel);
this.optionsPanel.Controls.Add(this.LimitActiveYLabel);
- this.optionsPanel.Controls.Add(this.OffsetActiveYLabel);
+ this.optionsPanel.Controls.Add(this.InputOffsetActiveYLabel);
+ this.optionsPanel.Controls.Add(this.OutputOffsetActiveYLabel);
this.optionsPanel.Controls.Add(this.AccelerationActiveLabelY);
this.optionsPanel.Controls.Add(this.accelTypeDropY);
this.optionsPanel.Controls.Add(this.midpointBoxY);
this.optionsPanel.Controls.Add(this.limitBoxY);
- this.optionsPanel.Controls.Add(this.offsetBoxY);
+ this.optionsPanel.Controls.Add(this.inputOffsetBoxY);
+ this.optionsPanel.Controls.Add(this.outputOffsetBoxY);
this.optionsPanel.Controls.Add(this.accelerationBoxY);
this.optionsPanel.Controls.Add(this.MidpointActiveXLabel);
this.optionsPanel.Controls.Add(this.LimitActiveXLabel);
- this.optionsPanel.Controls.Add(this.OffsetActiveXLabel);
+ this.optionsPanel.Controls.Add(this.InputOffsetActiveXLabel);
+ this.optionsPanel.Controls.Add(this.OutputOffsetActiveXLabel);
this.optionsPanel.Controls.Add(this.InCapActiveYLabelClassic);
this.optionsPanel.Controls.Add(this.InCapActiveXLabelClassic);
this.optionsPanel.Controls.Add(this.AccelerationActiveLabelX);
@@ -401,8 +395,10 @@ namespace grapher
this.optionsPanel.Controls.Add(this.inCapBoxYClassic);
this.optionsPanel.Controls.Add(this.VertHorzRatioBox);
this.optionsPanel.Controls.Add(this.writeButton);
- this.optionsPanel.Controls.Add(this.offsetLabelX);
- this.optionsPanel.Controls.Add(this.offsetBoxX);
+ this.optionsPanel.Controls.Add(this.inputOffsetLabelX);
+ this.optionsPanel.Controls.Add(this.outputOffsetLabelX);
+ this.optionsPanel.Controls.Add(this.inputOffsetBoxX);
+ this.optionsPanel.Controls.Add(this.outputOffsetBoxX);
this.optionsPanel.Controls.Add(this.constantThreeLabelX);
this.optionsPanel.Controls.Add(this.midpointBoxX);
this.optionsPanel.Controls.Add(this.limitLabelX);
@@ -423,59 +419,7 @@ namespace grapher
this.optionsPanel.Name = "optionsPanel";
this.optionsPanel.Size = new System.Drawing.Size(483, 956);
this.optionsPanel.TabIndex = 34;
- //
- // powerStartsFromOneBoxY
- //
- this.powerStartsFromOneBoxY.Location = new System.Drawing.Point(363, 220);
- this.powerStartsFromOneBoxY.Name = "powerStartsFromOneBoxY";
- this.powerStartsFromOneBoxY.Size = new System.Drawing.Size(32, 17);
- this.powerStartsFromOneBoxY.TabIndex = 0;
- this.powerStartsFromOneBoxY.Text = "1";
- this.powerStartsFromOneBoxY.UseVisualStyleBackColor = true;
- //
- // powerStartsFromZeroBoxY
- //
- this.powerStartsFromZeroBoxY.Location = new System.Drawing.Point(332, 220);
- this.powerStartsFromZeroBoxY.Name = "powerStartsFromZeroBoxY";
- this.powerStartsFromZeroBoxY.Size = new System.Drawing.Size(32, 17);
- this.powerStartsFromZeroBoxY.TabIndex = 0;
- this.powerStartsFromZeroBoxY.Text = "0";
- this.powerStartsFromZeroBoxY.UseVisualStyleBackColor = true;
- //
- // powerStartsFromOneBoxX
- //
- this.powerStartsFromOneBoxX.Location = new System.Drawing.Point(136, 220);
- this.powerStartsFromOneBoxX.Name = "powerStartsFromOneBoxX";
- this.powerStartsFromOneBoxX.Size = new System.Drawing.Size(32, 17);
- this.powerStartsFromOneBoxX.TabIndex = 0;
- this.powerStartsFromOneBoxX.Text = "1";
- this.powerStartsFromOneBoxX.UseVisualStyleBackColor = true;
- //
- // powerStartsFromZeroBoxX
- //
- this.powerStartsFromZeroBoxX.Location = new System.Drawing.Point(106, 220);
- this.powerStartsFromZeroBoxX.Name = "powerStartsFromZeroBoxX";
- this.powerStartsFromZeroBoxX.Size = new System.Drawing.Size(32, 17);
- this.powerStartsFromZeroBoxX.TabIndex = 0;
- this.powerStartsFromZeroBoxX.Text = "0";
- this.powerStartsFromZeroBoxX.UseVisualStyleBackColor = true;
- //
- // powerStartFromLabelY
- //
- this.powerStartFromLabelY.Location = new System.Drawing.Point(266, 220);
- this.powerStartFromLabelY.Name = "powerStartFromLabelY";
- this.powerStartFromLabelY.Size = new System.Drawing.Size(52, 13);
- this.powerStartFromLabelY.TabIndex = 0;
- this.powerStartFromLabelY.Text = "Start from";
- //
- // powerStartFromLabelX
- //
- this.powerStartFromLabelX.Location = new System.Drawing.Point(38, 220);
- this.powerStartFromLabelX.Name = "powerStartFromLabelX";
- this.powerStartFromLabelX.Size = new System.Drawing.Size(55, 13);
- this.powerStartFromLabelX.TabIndex = 0;
- this.powerStartFromLabelX.Text = "Start from";
- //
+ //
// OutCapActiveYLabelPower
//
this.OutCapActiveYLabelPower.AutoSize = true;
@@ -1452,12 +1396,19 @@ namespace grapher
//
// offsetLabelY
//
- this.offsetLabelY.AutoSize = true;
- this.offsetLabelY.Location = new System.Drawing.Point(263, 248);
- this.offsetLabelY.Name = "offsetLabelY";
- this.offsetLabelY.Size = new System.Drawing.Size(35, 13);
- this.offsetLabelY.TabIndex = 135;
- this.offsetLabelY.Text = "Offset";
+ this.inputOffsetLabelY.AutoSize = true;
+ this.inputOffsetLabelY.Location = new System.Drawing.Point(263, 248);
+ this.inputOffsetLabelY.Name = "inputOffsetLabelY";
+ this.inputOffsetLabelY.Size = new System.Drawing.Size(35, 13);
+ this.inputOffsetLabelY.TabIndex = 135;
+ this.inputOffsetLabelY.Text = "Input Offset";
+
+ this.outputOffsetLabelY.AutoSize = true;
+ this.outputOffsetLabelY.Location = new System.Drawing.Point(263, 248);
+ this.outputOffsetLabelY.Name = "outputOffsetLabelY";
+ this.outputOffsetLabelY.Size = new System.Drawing.Size(35, 13);
+ this.outputOffsetLabelY.TabIndex = 135;
+ this.outputOffsetLabelY.Text = "Output Offset";
//
// inCapLabelYClassic
//
@@ -1508,12 +1459,19 @@ namespace grapher
//
// OffsetActiveYLabel
//
- this.OffsetActiveYLabel.AutoSize = true;
- this.OffsetActiveYLabel.Location = new System.Drawing.Point(414, 248);
- this.OffsetActiveYLabel.Name = "OffsetActiveYLabel";
- this.OffsetActiveYLabel.Size = new System.Drawing.Size(13, 13);
- this.OffsetActiveYLabel.TabIndex = 129;
- this.OffsetActiveYLabel.Text = "0";
+ this.InputOffsetActiveYLabel.AutoSize = true;
+ this.InputOffsetActiveYLabel.Location = new System.Drawing.Point(414, 248);
+ this.InputOffsetActiveYLabel.Name = "InputOffsetActiveYLabel";
+ this.InputOffsetActiveYLabel.Size = new System.Drawing.Size(13, 13);
+ this.InputOffsetActiveYLabel.TabIndex = 129;
+ this.InputOffsetActiveYLabel.Text = "0";
+
+ this.OutputOffsetActiveYLabel.AutoSize = true;
+ this.OutputOffsetActiveYLabel.Location = new System.Drawing.Point(414, 248);
+ this.OutputOffsetActiveYLabel.Name = "OutputOffsetActiveYLabel";
+ this.OutputOffsetActiveYLabel.Size = new System.Drawing.Size(13, 13);
+ this.OutputOffsetActiveYLabel.TabIndex = 129;
+ this.OutputOffsetActiveYLabel.Text = "0";
//
// AccelerationActiveLabelY
//
@@ -1549,10 +1507,15 @@ namespace grapher
//
// offsetBoxY
//
- this.offsetBoxY.Location = new System.Drawing.Point(332, 245);
- this.offsetBoxY.Name = "offsetBoxY";
- this.offsetBoxY.Size = new System.Drawing.Size(76, 20);
- this.offsetBoxY.TabIndex = 106;
+ this.inputOffsetBoxY.Location = new System.Drawing.Point(332, 245);
+ this.inputOffsetBoxY.Name = "inputOffsetBoxY";
+ this.inputOffsetBoxY.Size = new System.Drawing.Size(76, 20);
+ this.inputOffsetBoxY.TabIndex = 106;
+
+ this.outputOffsetBoxY.Location = new System.Drawing.Point(332, 245);
+ this.outputOffsetBoxY.Name = "outputOffsetBoxY";
+ this.outputOffsetBoxY.Size = new System.Drawing.Size(76, 20);
+ this.outputOffsetBoxY.TabIndex = 106;
//
// accelerationBoxY
//
@@ -1581,12 +1544,19 @@ namespace grapher
//
// OffsetActiveXLabel
//
- this.OffsetActiveXLabel.AutoSize = true;
- this.OffsetActiveXLabel.Location = new System.Drawing.Point(197, 248);
- this.OffsetActiveXLabel.Name = "OffsetActiveXLabel";
- this.OffsetActiveXLabel.Size = new System.Drawing.Size(13, 13);
- this.OffsetActiveXLabel.TabIndex = 125;
- this.OffsetActiveXLabel.Text = "0";
+ this.InputOffsetActiveXLabel.AutoSize = true;
+ this.InputOffsetActiveXLabel.Location = new System.Drawing.Point(197, 248);
+ this.InputOffsetActiveXLabel.Name = "InputOffsetActiveXLabel";
+ this.InputOffsetActiveXLabel.Size = new System.Drawing.Size(13, 13);
+ this.InputOffsetActiveXLabel.TabIndex = 125;
+ this.InputOffsetActiveXLabel.Text = "0";
+
+ this.OutputOffsetActiveXLabel.AutoSize = true;
+ this.OutputOffsetActiveXLabel.Location = new System.Drawing.Point(197, 248);
+ this.OutputOffsetActiveXLabel.Name = "OutputOffsetActiveXLabel";
+ this.OutputOffsetActiveXLabel.Size = new System.Drawing.Size(13, 13);
+ this.OutputOffsetActiveXLabel.TabIndex = 125;
+ this.OutputOffsetActiveXLabel.Text = "0";
//
// InCapActiveYLabelClassic
//
@@ -1715,20 +1685,33 @@ namespace grapher
//
// offsetLabelX
//
- this.offsetLabelX.AutoSize = true;
- this.offsetLabelX.Location = new System.Drawing.Point(37, 248);
- this.offsetLabelX.Name = "offsetLabelX";
- this.offsetLabelX.Size = new System.Drawing.Size(35, 13);
- this.offsetLabelX.TabIndex = 107;
- this.offsetLabelX.Text = "Offset";
- this.offsetLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+ this.inputOffsetLabelX.AutoSize = true;
+ this.inputOffsetLabelX.Location = new System.Drawing.Point(37, 248);
+ this.inputOffsetLabelX.Name = "inputOffsetLabelX";
+ this.inputOffsetLabelX.Size = new System.Drawing.Size(35, 13);
+ this.inputOffsetLabelX.TabIndex = 107;
+ this.inputOffsetLabelX.Text = "Input Offset";
+ this.inputOffsetLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
+
+ this.outputOffsetLabelX.AutoSize = true;
+ this.outputOffsetLabelX.Location = new System.Drawing.Point(37, 248);
+ this.outputOffsetLabelX.Name = "outputOffsetLabelX";
+ this.outputOffsetLabelX.Size = new System.Drawing.Size(35, 13);
+ this.outputOffsetLabelX.TabIndex = 107;
+ this.outputOffsetLabelX.Text = "Output Offset";
+ this.outputOffsetLabelX.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// offsetBoxX
//
- this.offsetBoxX.Location = new System.Drawing.Point(106, 245);
- this.offsetBoxX.Name = "offsetBoxX";
- this.offsetBoxX.Size = new System.Drawing.Size(76, 20);
- this.offsetBoxX.TabIndex = 92;
+ this.inputOffsetBoxX.Location = new System.Drawing.Point(106, 245);
+ this.inputOffsetBoxX.Name = "inputOffsetBoxX";
+ this.inputOffsetBoxX.Size = new System.Drawing.Size(76, 20);
+ this.inputOffsetBoxX.TabIndex = 92;
+
+ this.outputOffsetBoxX.Location = new System.Drawing.Point(106, 245);
+ this.outputOffsetBoxX.Name = "outputOffsetBoxX";
+ this.outputOffsetBoxX.Size = new System.Drawing.Size(76, 20);
+ this.outputOffsetBoxX.TabIndex = 92;
//
// constantThreeLabelX
//
@@ -2206,24 +2189,6 @@ namespace grapher
title6.Text = "Sensitivity";
this.AccelerationChart.Titles.Add(title6);
//
- // powerStartFromActiveLabelX
- //
- this.powerStartFromActiveLabelX.AutoSize = true;
- this.powerStartFromActiveLabelX.Location = new System.Drawing.Point(197, 220);
- this.powerStartFromActiveLabelX.Name = "powerStartFromActiveLabelX";
- this.powerStartFromActiveLabelX.Size = new System.Drawing.Size(13, 13);
- this.powerStartFromActiveLabelX.TabIndex = 225;
- this.powerStartFromActiveLabelX.Text = "0";
- //
- // powerStartFromActiveLabelY
- //
- this.powerStartFromActiveLabelY.AutoSize = true;
- this.powerStartFromActiveLabelY.Location = new System.Drawing.Point(414, 221);
- this.powerStartFromActiveLabelY.Name = "powerStartFromActiveLabelY";
- this.powerStartFromActiveLabelY.Size = new System.Drawing.Size(13, 13);
- this.powerStartFromActiveLabelY.TabIndex = 226;
- this.powerStartFromActiveLabelY.Text = "0";
- //
// RawAcceleration
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@@ -2273,22 +2238,26 @@ namespace grapher
private System.Windows.Forms.Label OptionSetXTitle;
private System.Windows.Forms.Label constantThreeLabelY;
private System.Windows.Forms.Label limitLabelY;
- private System.Windows.Forms.Label offsetLabelY;
+ private System.Windows.Forms.Label inputOffsetLabelY;
+ private System.Windows.Forms.Label outputOffsetLabelY;
private System.Windows.Forms.Label inCapLabelYClassic;
private System.Windows.Forms.Label constantOneLabelY;
private System.Windows.Forms.CheckBox ByComponentXYLock;
private System.Windows.Forms.Label MidpointActiveYLabel;
private System.Windows.Forms.Label LimitActiveYLabel;
- private System.Windows.Forms.Label OffsetActiveYLabel;
+ private System.Windows.Forms.Label InputOffsetActiveYLabel;
+ private System.Windows.Forms.Label OutputOffsetActiveYLabel;
private System.Windows.Forms.Label AccelerationActiveLabelY;
private System.Windows.Forms.ComboBox accelTypeDropY;
private System.Windows.Forms.TextBox midpointBoxY;
private System.Windows.Forms.TextBox limitBoxY;
- private System.Windows.Forms.TextBox offsetBoxY;
+ private System.Windows.Forms.TextBox inputOffsetBoxY;
+ private System.Windows.Forms.TextBox outputOffsetBoxY;
private System.Windows.Forms.TextBox accelerationBoxY;
private System.Windows.Forms.Label MidpointActiveXLabel;
private System.Windows.Forms.Label LimitActiveXLabel;
- private System.Windows.Forms.Label OffsetActiveXLabel;
+ private System.Windows.Forms.Label InputOffsetActiveXLabel;
+ private System.Windows.Forms.Label OutputOffsetActiveXLabel;
private System.Windows.Forms.Label InCapActiveYLabelClassic;
private System.Windows.Forms.Label InCapActiveXLabelClassic;
private System.Windows.Forms.Label AccelerationActiveLabelX;
@@ -2303,8 +2272,10 @@ namespace grapher
private System.Windows.Forms.TextBox inCapBoxYClassic;
private System.Windows.Forms.TextBox VertHorzRatioBox;
private System.Windows.Forms.Button writeButton;
- private System.Windows.Forms.Label offsetLabelX;
- private System.Windows.Forms.TextBox offsetBoxX;
+ private System.Windows.Forms.Label inputOffsetLabelX;
+ private System.Windows.Forms.Label outputOffsetLabelX;
+ private System.Windows.Forms.TextBox inputOffsetBoxX;
+ private System.Windows.Forms.TextBox outputOffsetBoxX;
private System.Windows.Forms.Label constantThreeLabelX;
private System.Windows.Forms.TextBox midpointBoxX;
private System.Windows.Forms.Label limitLabelX;
@@ -2431,14 +2402,6 @@ namespace grapher
private System.Windows.Forms.TextBox outCapBoxXPower;
private System.Windows.Forms.TextBox inCapBoxYPower;
private System.Windows.Forms.TextBox inCapBoxXPower;
- private System.Windows.Forms.CheckBox powerStartsFromOneBoxY;
- private System.Windows.Forms.CheckBox powerStartsFromZeroBoxY;
- private System.Windows.Forms.CheckBox powerStartsFromOneBoxX;
- private System.Windows.Forms.CheckBox powerStartsFromZeroBoxX;
- private System.Windows.Forms.Label powerStartFromLabelY;
- private System.Windows.Forms.Label powerStartFromLabelX;
- private System.Windows.Forms.Label powerStartFromActiveLabelX;
- private System.Windows.Forms.Label powerStartFromActiveLabelY;
}
}
diff --git a/grapher/Form1.cs b/grapher/Form1.cs
index 9e88912..00483d5 100644
--- a/grapher/Form1.cs
+++ b/grapher/Form1.cs
@@ -82,8 +82,10 @@ namespace grapher
inCapBoxYPower,
outCapBoxXPower,
outCapBoxYPower,
- offsetBoxX,
- offsetBoxY,
+ inputOffsetBoxX,
+ inputOffsetBoxY,
+ outputOffsetBoxX,
+ outputOffsetBoxY,
accelerationBoxX,
accelerationBoxY,
decayRateBoxX,
@@ -114,10 +116,6 @@ namespace grapher
ByComponentCheckBox,
gainSwitchX,
gainSwitchY,
- powerStartsFromZeroBoxX,
- powerStartsFromOneBoxX,
- powerStartsFromZeroBoxY,
- powerStartsFromOneBoxY,
XLutActiveValuesBox,
YLutActiveValuesBox,
XLutPointsBox,
@@ -138,8 +136,10 @@ namespace grapher
outCapLabelYPower,
CapTypeLabelXPower,
CapTypeLabelYPower,
- offsetLabelX,
- offsetLabelY,
+ inputOffsetLabelX,
+ inputOffsetLabelY,
+ outputOffsetLabelX,
+ outputOffsetLabelY,
constantOneLabelX,
constantOneLabelY,
decayRateLabelX,
@@ -156,8 +156,6 @@ namespace grapher
powerLabelY,
expLabelX,
expLabelY,
- powerStartFromLabelX,
- powerStartFromLabelY,
LUTTextLabelX,
LUTTextLabelY,
constantThreeLabelX,
@@ -179,8 +177,10 @@ namespace grapher
OutCapActiveYLabelPower,
CapTypeActiveXLabelPower,
CapTypeActiveYLabelPower,
- OffsetActiveXLabel,
- OffsetActiveYLabel,
+ InputOffsetActiveXLabel,
+ InputOffsetActiveYLabel,
+ OutputOffsetActiveXLabel,
+ OutputOffsetActiveYLabel,
AccelerationActiveLabelX,
AccelerationActiveLabelY,
DecayRateActiveXLabel,
@@ -197,8 +197,6 @@ namespace grapher
PowerClassicActiveYLabel,
ExpActiveXLabel,
ExpActiveYLabel,
- powerStartFromActiveLabelX,
- powerStartFromActiveLabelY,
MidpointActiveXLabel,
MidpointActiveYLabel,
AccelTypeActiveLabelX,
diff --git a/grapher/Layouts/ClassicLayout.cs b/grapher/Layouts/ClassicLayout.cs
index 05c590f..4f82e8a 100644
--- a/grapher/Layouts/ClassicLayout.cs
+++ b/grapher/Layouts/ClassicLayout.cs
@@ -16,11 +16,11 @@ namespace grapher.Layouts
DecayRateLayout = new OptionLayout(false, string.Empty);
GrowthRateLayout = new OptionLayout(false, string.Empty);
SmoothLayout = new OptionLayout(false, string.Empty);
- OffsetLayout = new OptionLayout(true, Offset);
+ InputOffsetLayout = new OptionLayout(true, InputOffset);
LimitLayout = new OptionLayout(false, string.Empty);
PowerClassicLayout = new OptionLayout(true, PowerClassic);
ExponentLayout = new OptionLayout(false, string.Empty);
- PowerStartsFromLayout = new OptionLayout(false, string.Empty);
+ OutputOffsetLayout = new OptionLayout(false, string.Empty);
MidpointLayout = new OptionLayout(false, string.Empty);
LutTextLayout = new OptionLayout(false, string.Empty);
LutPanelLayout = new OptionLayout(false, string.Empty);
diff --git a/grapher/Layouts/DefaultLayout.cs b/grapher/Layouts/DefaultLayout.cs
index 1b45307..f44de01 100644
--- a/grapher/Layouts/DefaultLayout.cs
+++ b/grapher/Layouts/DefaultLayout.cs
@@ -17,11 +17,11 @@ namespace grapher.Layouts
DecayRateLayout = new OptionLayout(true, DecayRate);
GrowthRateLayout = new OptionLayout(true, GrowthRate);
SmoothLayout = new OptionLayout(true, Smooth);
- OffsetLayout = new OptionLayout(true, Offset);
+ InputOffsetLayout = new OptionLayout(true, InputOffset);
LimitLayout = new OptionLayout(true, Limit);
PowerClassicLayout = new OptionLayout(true, PowerClassic);
ExponentLayout = new OptionLayout(true, Exponent);
- PowerStartsFromLayout = new OptionLayout(false, string.Empty);
+ OutputOffsetLayout = new OptionLayout(false, string.Empty);
MidpointLayout = new OptionLayout(true, Midpoint);
LutTextLayout = new OptionLayout(false, string.Empty);
LutPanelLayout = new OptionLayout(false, string.Empty);
diff --git a/grapher/Layouts/JumpLayout.cs b/grapher/Layouts/JumpLayout.cs
index 40e7629..9554175 100644
--- a/grapher/Layouts/JumpLayout.cs
+++ b/grapher/Layouts/JumpLayout.cs
@@ -17,11 +17,11 @@ namespace grapher.Layouts
DecayRateLayout = new OptionLayout(false, string.Empty);
GrowthRateLayout = new OptionLayout(false, string.Empty);
SmoothLayout = new OptionLayout(true, Smooth);
- OffsetLayout = new OptionLayout(true, Offset);
+ InputOffsetLayout = new OptionLayout(true, InputOffset);
LimitLayout = new OptionLayout(false, Limit);
PowerClassicLayout = new OptionLayout(false, string.Empty);
ExponentLayout = new OptionLayout(false, string.Empty);
- PowerStartsFromLayout = new OptionLayout(false, string.Empty);
+ OutputOffsetLayout = new OptionLayout(false, string.Empty);
MidpointLayout = new OptionLayout(false, string.Empty);
LutTextLayout = new OptionLayout(false, string.Empty);
LutPanelLayout = new OptionLayout(false, string.Empty);
diff --git a/grapher/Layouts/LUTLayout.cs b/grapher/Layouts/LUTLayout.cs
index 5412294..88f8280 100644
--- a/grapher/Layouts/LUTLayout.cs
+++ b/grapher/Layouts/LUTLayout.cs
@@ -25,10 +25,10 @@ namespace grapher.Layouts
DecayRateLayout = new OptionLayout(false, string.Empty);
GrowthRateLayout = new OptionLayout(false, string.Empty);
SmoothLayout = new OptionLayout(false, string.Empty);
- OffsetLayout = new OptionLayout(false, Offset);
+ InputOffsetLayout = new OptionLayout(false, string.Empty);
LimitLayout = new OptionLayout(false, string.Empty);
PowerClassicLayout = new OptionLayout(false, string.Empty);
- PowerStartsFromLayout = new OptionLayout(false, string.Empty);
+ OutputOffsetLayout = new OptionLayout(false, string.Empty);
ExponentLayout = new OptionLayout(false, Exponent);
MidpointLayout = new OptionLayout(false, string.Empty);
LutTextLayout = new OptionLayout(true, string.Empty);
diff --git a/grapher/Layouts/LayoutBase.cs b/grapher/Layouts/LayoutBase.cs
index a283008..1dced61 100644
--- a/grapher/Layouts/LayoutBase.cs
+++ b/grapher/Layouts/LayoutBase.cs
@@ -9,12 +9,12 @@ namespace grapher.Layouts
public const string DecayRate = "Decay Rate";
public const string Scale = "Scale";
public const string Exponent = "Exponent";
- public const string StartsFrom = "Start from";
+ public const string OutputOffset = "Output Offset";
public const string PowerClassic = "Power";
public const string Limit = "Limit";
public const string Midpoint = "Midpoint";
public const string Motivity = "Motivity";
- public const string Offset = "Offset";
+ public const string InputOffset = "Input Offset";
public const string CapType = "Cap Type";
public const string Weight = "Weight";
public const string Smooth = "Smooth";
@@ -27,11 +27,11 @@ namespace grapher.Layouts
SmoothLayout = new OptionLayout(false, string.Empty);
ClassicCapLayout = new OptionLayout(false, string.Empty);
PowerCapLayout = new OptionLayout(false, string.Empty);
- OffsetLayout = new OptionLayout(false, string.Empty);
+ InputOffsetLayout = new OptionLayout(false, string.Empty);
LimitLayout = new OptionLayout(false, string.Empty);
PowerClassicLayout = new OptionLayout(false, string.Empty);
ExponentLayout = new OptionLayout(false, string.Empty);
- PowerStartsFromLayout = new OptionLayout(false, string.Empty);
+ OutputOffsetLayout = new OptionLayout(false, string.Empty);
MidpointLayout = new OptionLayout(false, string.Empty);
LutTextLayout = new OptionLayout(false, string.Empty);
LutPanelLayout = new OptionLayout(false, string.Empty);
@@ -59,7 +59,7 @@ namespace grapher.Layouts
protected OptionLayout PowerCapLayout { get; set; }
- protected OptionLayout OffsetLayout { get; set; }
+ protected OptionLayout InputOffsetLayout { get; set; }
protected OptionLayout LimitLayout { get; set; }
@@ -67,7 +67,7 @@ namespace grapher.Layouts
protected OptionLayout ExponentLayout { get; set; }
- protected OptionLayout PowerStartsFromLayout { get; set; }
+ protected OptionLayout OutputOffsetLayout { get; set; }
protected OptionLayout MidpointLayout { get; set; }
@@ -91,11 +91,11 @@ namespace grapher.Layouts
IOption decayRateOption,
IOption growthRateOption,
IOption smoothOption,
- IOption offsetOption,
+ IOption inputOffsetOption,
IOption limitOption,
IOption powerClassicOption,
IOption expOption,
- IOption startsFromOption,
+ IOption outputOffsetOption,
IOption midpointOption,
IOption lutTextOption,
IOption lutPanelOption,
@@ -112,11 +112,11 @@ namespace grapher.Layouts
(DecayRateLayout, decayRateOption),
(GrowthRateLayout, growthRateOption),
(SmoothLayout, smoothOption),
- (OffsetLayout, offsetOption),
+ (InputOffsetLayout, inputOffsetOption),
(LimitLayout, limitOption),
(PowerClassicLayout, powerClassicOption),
(ExponentLayout, expOption),
- (PowerStartsFromLayout, startsFromOption),
+ (OutputOffsetLayout, outputOffsetOption),
(MidpointLayout, midpointOption),
(LutTextLayout, lutTextOption),
(LutPanelLayout, lutPanelOption),
@@ -147,11 +147,11 @@ namespace grapher.Layouts
IOption decayRateOption,
IOption growthRateOption,
IOption smoothOption,
- IOption offsetOption,
+ IOption inputOffsetOption,
IOption limitOption,
IOption powerClassicOption,
IOption expOption,
- IOption startsFromOption,
+ IOption outputOffsetOption,
IOption midpointOption,
IOption lutTextOption,
IOption lutPanelOption,
@@ -163,11 +163,11 @@ namespace grapher.Layouts
decayRateOption,
growthRateOption,
smoothOption,
- offsetOption,
+ inputOffsetOption,
limitOption,
powerClassicOption,
expOption,
- startsFromOption,
+ outputOffsetOption,
midpointOption,
lutTextOption,
lutPanelOption,
diff --git a/grapher/Layouts/LinearLayout.cs b/grapher/Layouts/LinearLayout.cs
index f6b3cc0..279f0a9 100644
--- a/grapher/Layouts/LinearLayout.cs
+++ b/grapher/Layouts/LinearLayout.cs
@@ -18,10 +18,10 @@ namespace grapher.Layouts
DecayRateLayout = new OptionLayout(false, string.Empty);
GrowthRateLayout = new OptionLayout(false, string.Empty);
SmoothLayout = new OptionLayout(false, string.Empty);
- OffsetLayout = new OptionLayout(true, Offset);
+ InputOffsetLayout = new OptionLayout(true, InputOffset);
LimitLayout = new OptionLayout(false, string.Empty);
PowerClassicLayout = new OptionLayout(false, string.Empty);
- PowerStartsFromLayout = new OptionLayout(false, string.Empty);
+ OutputOffsetLayout = new OptionLayout(false, string.Empty);
ExponentLayout = new OptionLayout(false, string.Empty);
MidpointLayout = new OptionLayout(false, string.Empty);
LutTextLayout = new OptionLayout(false, string.Empty);
diff --git a/grapher/Layouts/MotivityLayout.cs b/grapher/Layouts/MotivityLayout.cs
index ebce103..15394d2 100644
--- a/grapher/Layouts/MotivityLayout.cs
+++ b/grapher/Layouts/MotivityLayout.cs
@@ -22,11 +22,11 @@ namespace grapher.Layouts
DecayRateLayout = new OptionLayout(false, string.Empty);
GrowthRateLayout = new OptionLayout(true, GrowthRate);
SmoothLayout = new OptionLayout(false, string.Empty);
- OffsetLayout = new OptionLayout(false, string.Empty);
+ InputOffsetLayout = new OptionLayout(false, string.Empty);
LimitLayout = new OptionLayout(true, Motivity);
PowerClassicLayout = new OptionLayout(false, string.Empty);
ExponentLayout = new OptionLayout(false, string.Empty);
- PowerStartsFromLayout = new OptionLayout(false, string.Empty);
+ OutputOffsetLayout = new OptionLayout(false, string.Empty);
MidpointLayout = new OptionLayout(true, Midpoint);
LutTextLayout = new OptionLayout(false, string.Empty);
LutPanelLayout = new OptionLayout(false, string.Empty);
diff --git a/grapher/Layouts/NaturalLayout.cs b/grapher/Layouts/NaturalLayout.cs
index ed5ade9..d182d6d 100644
--- a/grapher/Layouts/NaturalLayout.cs
+++ b/grapher/Layouts/NaturalLayout.cs
@@ -17,11 +17,11 @@ namespace grapher.Layouts
DecayRateLayout = new OptionLayout(true, DecayRate);
GrowthRateLayout = new OptionLayout(false, string.Empty);
SmoothLayout = new OptionLayout(false, string.Empty);
- OffsetLayout = new OptionLayout(true, Offset);
+ InputOffsetLayout = new OptionLayout(true, InputOffset);
LimitLayout = new OptionLayout(true, Limit);
PowerClassicLayout = new OptionLayout(false, string.Empty);
ExponentLayout = new OptionLayout(false, string.Empty);
- PowerStartsFromLayout = new OptionLayout(false, string.Empty);
+ OutputOffsetLayout = new OptionLayout(false, string.Empty);
MidpointLayout = new OptionLayout(false, string.Empty);
LutTextLayout = new OptionLayout(false, string.Empty);
LutPanelLayout = new OptionLayout(false, string.Empty);
diff --git a/grapher/Layouts/OffLayout.cs b/grapher/Layouts/OffLayout.cs
index 92333d9..630ea16 100644
--- a/grapher/Layouts/OffLayout.cs
+++ b/grapher/Layouts/OffLayout.cs
@@ -17,11 +17,11 @@ namespace grapher.Layouts
DecayRateLayout = new OptionLayout(false, string.Empty);
GrowthRateLayout = new OptionLayout(false, string.Empty);
SmoothLayout = new OptionLayout(false, string.Empty);
- OffsetLayout = new OptionLayout(false, string.Empty);
+ InputOffsetLayout = new OptionLayout(false, string.Empty);
LimitLayout = new OptionLayout(false, string.Empty);
PowerClassicLayout = new OptionLayout(false, string.Empty);
ExponentLayout = new OptionLayout(false, string.Empty);
- PowerStartsFromLayout = new OptionLayout(false, string.Empty);
+ OutputOffsetLayout = new OptionLayout(false, string.Empty);
MidpointLayout = new OptionLayout(false, string.Empty);
LutTextLayout = new OptionLayout(false, string.Empty);
LutPanelLayout = new OptionLayout(false, string.Empty);
diff --git a/grapher/Layouts/PowerLayout.cs b/grapher/Layouts/PowerLayout.cs
index c25bbbb..e34e6a5 100644
--- a/grapher/Layouts/PowerLayout.cs
+++ b/grapher/Layouts/PowerLayout.cs
@@ -15,11 +15,11 @@
DecayRateLayout = new OptionLayout(false, string.Empty);
GrowthRateLayout = new OptionLayout(false, string.Empty);
SmoothLayout = new OptionLayout(false, string.Empty);
- OffsetLayout = new OptionLayout(false, string.Empty);
+ InputOffsetLayout = new OptionLayout(false, string.Empty);
LimitLayout = new OptionLayout(false, string.Empty);
PowerClassicLayout = new OptionLayout(false, string.Empty);
ExponentLayout = new OptionLayout(true, Exponent);
- PowerStartsFromLayout = new OptionLayout(true, StartsFrom);
+ OutputOffsetLayout = new OptionLayout(true, OutputOffset);
MidpointLayout = new OptionLayout(false, string.Empty);
LutTextLayout = new OptionLayout(false, string.Empty);
LutPanelLayout = new OptionLayout(false, string.Empty);
diff --git a/grapher/Layouts/UnsupportedLayout.cs b/grapher/Layouts/UnsupportedLayout.cs
index 3faf721..3aa88aa 100644
--- a/grapher/Layouts/UnsupportedLayout.cs
+++ b/grapher/Layouts/UnsupportedLayout.cs
@@ -22,11 +22,11 @@ namespace grapher.Layouts
DecayRateLayout = new OptionLayout(false, string.Empty);
GrowthRateLayout = new OptionLayout(false, string.Empty);
SmoothLayout = new OptionLayout(false, string.Empty);
- OffsetLayout = new OptionLayout(false, Offset);
+ InputOffsetLayout = new OptionLayout(false, string.Empty);
LimitLayout = new OptionLayout(false, string.Empty);
PowerClassicLayout = new OptionLayout(false, string.Empty);
ExponentLayout = new OptionLayout(false, Exponent);
- PowerStartsFromLayout = new OptionLayout(false, string.Empty);
+ OutputOffsetLayout = new OptionLayout(false, string.Empty);
MidpointLayout = new OptionLayout(false, string.Empty);
LutTextLayout = new OptionLayout(true, LUTLayoutText);
LutPanelLayout = new OptionLayout(false, string.Empty);
diff --git a/grapher/Models/AccelGUIFactory.cs b/grapher/Models/AccelGUIFactory.cs
index 89318e2..bb65541 100644
--- a/grapher/Models/AccelGUIFactory.cs
+++ b/grapher/Models/AccelGUIFactory.cs
@@ -54,8 +54,10 @@ namespace grapher.Models
TextBox inCapBoxYPower,
TextBox outCapBoxXPower,
TextBox outCapBoxYPower,
- TextBox offsetBoxX,
- TextBox offsetBoxY,
+ TextBox inputOffsetBoxX,
+ TextBox inputOffsetBoxY,
+ TextBox outputOffsetBoxX,
+ TextBox outputOffsetBoxY,
TextBox accelerationBoxX,
TextBox accelerationBoxY,
TextBox decayRateBoxX,
@@ -86,10 +88,6 @@ namespace grapher.Models
CheckBox byComponentCheckBox,
CheckBox gainSwitchX,
CheckBox gainSwitchY,
- CheckBox powerStartsFromZeroBoxX,
- CheckBox powerStartsFromOneBoxX,
- CheckBox powerStartsFromZeroBoxY,
- CheckBox powerStartsFromOneBoxY,
RichTextBox xLutActiveValuesBox,
RichTextBox yLutActiveValuesBox,
RichTextBox xLutPointsBox,
@@ -110,8 +108,10 @@ namespace grapher.Models
Label outCapLabelYPower,
Label capTypeLabelXPower,
Label capTypeLabelYPower,
- Label offsetLabelX,
- Label offsetLabelY,
+ Label inputOffsetLabelX,
+ Label inputOffsetLabelY,
+ Label outputOffsetLabelX,
+ Label outputOffsetLabelY,
Label constantOneLabelX,
Label constantOneLabelY,
Label decayRateLabelX,
@@ -128,8 +128,6 @@ namespace grapher.Models
Label powerClassicLabelY,
Label expLabelX,
Label expLabelY,
- Label powerStartsFromLabelX,
- Label powerStartsFromLabelY,
Label lutTextLabelX,
Label lutTextLabelY,
Label constantThreeLabelX,
@@ -151,8 +149,10 @@ namespace grapher.Models
Label outCapActiveYLabelPower,
Label capTypeActiveXLabelPower,
Label capTypeActiveYLabelPower,
- Label offsetActiveLabelX,
- Label offsetActiveLabelY,
+ Label inputOffsetActiveLabelX,
+ Label inputOffsetActiveLabelY,
+ Label outputOffsetActiveLabelX,
+ Label outputOffsetActiveLabelY,
Label accelerationActiveLabelX,
Label accelerationActiveLabelY,
Label decayRateActiveLabelX,
@@ -169,8 +169,6 @@ namespace grapher.Models
Label powerClassicActiveLabelY,
Label expActiveLabelX,
Label expActiveLabelY,
- Label powerStartsFromActiveLabelX,
- Label powerStartsFromActiveLabelY,
Label midpointActiveLabelX,
Label midpointActiveLabelY,
Label accelTypeActiveLabelX,
@@ -249,22 +247,40 @@ namespace grapher.Models
var directionalityLeft = directionalityPanel.Left;
- var offsetX = new Option(
- offsetBoxX,
+ var inputOffsetX = new Option(
+ inputOffsetBoxX,
form,
0,
- offsetLabelX,
+ inputOffsetLabelX,
0,
- new ActiveValueLabel(offsetActiveLabelX, activeValueTitleX),
+ new ActiveValueLabel(inputOffsetActiveLabelX, activeValueTitleX),
"Offset");
- var offsetY = new Option(
- offsetBoxY,
+ var inputOffsetY = new Option(
+ inputOffsetBoxY,
form,
0,
- offsetLabelY,
+ inputOffsetLabelY,
optionSetYLeft,
- new ActiveValueLabel(offsetActiveLabelY, activeValueTitleY),
+ new ActiveValueLabel(inputOffsetActiveLabelY, activeValueTitleY),
+ "Offset");
+
+ var outputOffsetX = new Option(
+ outputOffsetBoxX,
+ form,
+ 0,
+ outputOffsetLabelX,
+ 0,
+ new ActiveValueLabel(outputOffsetActiveLabelX, activeValueTitleX),
+ "Offset");
+
+ var outputOffsetY = new Option(
+ outputOffsetBoxY,
+ form,
+ 0,
+ outputOffsetLabelY,
+ optionSetYLeft,
+ new ActiveValueLabel(outputOffsetActiveLabelY, activeValueTitleY),
"Offset");
var accelerationX = new Option(
@@ -495,20 +511,6 @@ namespace grapher.Models
outCapYPower,
scaleY);
- var powerStartsFromX = new SwitchOption(
- powerStartsFromLabelX,
- powerStartsFromZeroBoxX,
- powerStartsFromOneBoxX,
- new ActiveValueLabel(powerStartsFromActiveLabelX, activeValueTitleX),
- 0);
-
- var powerStartsFromY = new SwitchOption(
- powerStartsFromLabelY,
- powerStartsFromZeroBoxY,
- powerStartsFromOneBoxY,
- new ActiveValueLabel(powerStartsFromActiveLabelY, activeValueTitleY),
- optionSetYLeft);
-
var lpNorm = new Option(
new Field(lpNormBox, form, 2),
lpNormLabel,
@@ -554,11 +556,11 @@ namespace grapher.Models
gainSwitchOptionX,
classicCapOptionsX,
powerCapOptionsX,
- powerStartsFromX,
+ outputOffsetX,
decayRateX,
growthRateX,
smoothX,
- offsetX,
+ inputOffsetX,
limitX,
powerClassicX,
exponentX,
@@ -577,11 +579,11 @@ namespace grapher.Models
gainSwitchOptionY,
classicCapOptionsY,
powerCapOptionsY,
- powerStartsFromY,
+ outputOffsetY,
decayRateY,
growthRateY,
smoothY,
- offsetY,
+ inputOffsetY,
limitY,
powerClassicY,
exponentY,
diff --git a/grapher/Models/Options/AccelTypeOptions.cs b/grapher/Models/Options/AccelTypeOptions.cs
index b3153ed..d89f2d1 100644
--- a/grapher/Models/Options/AccelTypeOptions.cs
+++ b/grapher/Models/Options/AccelTypeOptions.cs
@@ -29,11 +29,11 @@ namespace grapher
CheckBoxOption gainSwitch,
CapOptions classicCap,
CapOptions powerCap,
- SwitchOption powerStartsFrom,
+ Option outputOffset,
Option decayRate,
Option growthRate,
Option smooth,
- Option offset,
+ Option inputOffset,
Option limit,
Option powerClassic,
Option exponent,
@@ -67,11 +67,11 @@ namespace grapher
Smooth = smooth;
ClassicCap = classicCap;
PowerCap = powerCap;
- Offset = offset;
+ InputOffset = inputOffset;
Limit = limit;
PowerClassic = powerClassic;
Exponent = exponent;
- PowerStartsFrom = powerStartsFrom;
+ OutputOffset = outputOffset;
Midpoint = midpoint;
WriteButton = writeButton;
AccelTypeActiveValue = accelTypeActiveValue;
@@ -114,9 +114,9 @@ namespace grapher
public CapOptions PowerCap { get; }
- public SwitchOption PowerStartsFrom { get; }
+ public Option InputOffset { get; }
- public Option Offset { get; }
+ public Option OutputOffset { get; }
public Option Limit { get; }
@@ -227,8 +227,8 @@ namespace grapher
Smooth.Hide();
ClassicCap.Hide();
PowerCap.Hide();
- PowerStartsFrom.Hide();
- Offset.Hide();
+ OutputOffset.Hide();
+ InputOffset.Hide();
Limit.Hide();
PowerClassic.Hide();
Exponent.Hide();
@@ -265,8 +265,8 @@ namespace grapher
args.cap.x,
args.cap.y,
args.capMode);
- PowerStartsFrom.SetActiveValue(!args.powerStartFromOne);
- Offset.SetActiveValue(args.offset);
+ OutputOffset.SetActiveValue(args.outputOffset);
+ InputOffset.SetActiveValue(args.inputOffset);
DecayRate.SetActiveValue(args.decayRate);
GrowthRate.SetActiveValue(args.growthRate);
Smooth.SetActiveValue(args.smooth);
@@ -328,7 +328,6 @@ namespace grapher
args.cap.y = PowerCap.Out.Field.Data;
args.capMode = PowerCap.CapTypeOptions.GetSelectedCapMode();
}
- if (PowerStartsFrom.Visible) args.powerStartFromOne = PowerStartsFrom.Second.Checked;
if (Limit.Visible)
{
if (args.mode == AccelMode.motivity)
@@ -342,7 +341,8 @@ namespace grapher
}
if (PowerClassic.Visible) args.exponentClassic = PowerClassic.Field.Data;
if (Exponent.Visible) args.exponentPower = Exponent.Field.Data;
- if (Offset.Visible) args.offset = Offset.Field.Data;
+ if (InputOffset.Visible) args.inputOffset = InputOffset.Field.Data;
+ if (OutputOffset.Visible) args.outputOffset = OutputOffset.Field.Data;
if (Midpoint.Visible) args.midpoint = Midpoint.Field.Data;
if (LutPanel.Visible)
{
@@ -369,8 +369,8 @@ namespace grapher
Smooth.AlignActiveValues();
ClassicCap.AlignActiveValues();
PowerCap.AlignActiveValues();
- PowerStartsFrom.AlignActiveValues();
- Offset.AlignActiveValues();
+ OutputOffset.AlignActiveValues();
+ InputOffset.AlignActiveValues();
Limit.AlignActiveValues();
PowerClassic.AlignActiveValues();
Exponent.AlignActiveValues();
@@ -407,11 +407,11 @@ namespace grapher
DecayRate,
GrowthRate,
Smooth,
- Offset,
+ InputOffset,
Limit,
PowerClassic,
Exponent,
- PowerStartsFrom,
+ OutputOffset,
Midpoint,
LutText,
LutPanel,
diff --git a/wrapper/wrapper.cpp b/wrapper/wrapper.cpp
index 9930454..ce4d298 100644
--- a/wrapper/wrapper.cpp
+++ b/wrapper/wrapper.cpp
@@ -64,7 +64,8 @@ public value struct AccelArgs
[MarshalAs(UnmanagedType::U1)]
bool gain;
- double offset;
+ double inputOffset;
+ double outputOffset;
double acceleration;
double decayRate;
double growthRate;
@@ -75,7 +76,6 @@ public value struct AccelArgs
double limit;
double midpoint;
double smooth;
- bool powerStartFromOne;
[JsonProperty("Cap / Jump")]
Vec2<double> cap;