PuffinPlot issue tracker

Bug: a88/416

ID : 416dce93-6868-4301-8fba-f506de656431
Short name : a88/416
Status : wontfix
Severity : minor
Assigned :
Reporter : Pontus Lurcock <pont@talvi.net>
Creator : Pontus Lurcock <pont@talvi.net>
Created : Fri, 16 Dec 2011 04:58:56 +0000
Target : 1.4
Summary : Add a Vec3Path class [198]

Comment: --------- Comment ---------
ID: cb7c364e-f811-4261-91ef-1085cf60a1ca
Short name: a88/416/cb7
From: Pontus Lurcock <pont@talvi.net>
Date: Fri, 16 Dec 2011 04:58:56 +0000

Vec3 contains a number of static methods which operate on 
sequences of vectors. These would probably be better handled by
a new companion class which acts as a wrapper around an ordered
list of vectors and permits operations on them. This might also
make it easier to keep vector paths immutable, if this proves
to be a worthwhile endeavour.

Comment: --------- Comment ---------
ID: d0c0d88d-8bee-43c0-b83b-8089824db3fa
Short name: a88/416/d0c
From: Pontus Lurcock <pont@talvi.net>
Date: Wed, 14 Oct 2015 15:51:14 +0000

On closer inspection, it's not clear that adding a Vec3Path would make
life much easier. The clearest benefit would be for methods which
currently accept a list of Vec3s, where a static Vec3 method could be
turned into a Vec3Path instance method. However, there's actually only
one such method in Vec3: interpolateEquatorPoints! (There are other
methods in Vec3 which take unordered Collections of Vec3s, but 
moving them to a new class wrapping an ordered list would add an
unnecessary restriction on the input data.) Most of the methods which
operate on List<Vec3> input are in other classes in the data
and plots packages, and it wouldn't make sense to combine their
specialized functionalities into a single grab-bag class.

Additionally, since this bug was opened, the Java 8 streams framework
has become available. This makes functional-style transformations on
Vec3 (and other) collections a lot clearer and more concise, and reduces
the need for a list-wrapper class to hide more verbose, explicitly
looped implementations of the same functionality.

Closing as wontfix.