Added a customizable 2D vector field plot function for https://thi.ng/viz. Some example outputs attached, code examples forthcoming...
Added a customizable 2D vector field plot function for https://thi.ng/viz. Some example outputs attached, code examples forthcoming...
Mathsy fedi, I have a question!
I have an arbitrarily sized cube of 3D space, and want to find the furthest possible distance an arbitrary number of points can be apart in it (and then average that and weight it by weights attached to the points and stuff but I can do all that hit).
This is presumably a very solved problem for low numbers (and I don't need more than low numbers), is there an easy enough formula or table I can use?
Boosts appreciated!
The third call for data papers describing datasets on #vectors of #humandiseases is closing this week!
GBIF has collaborated with #TDR, and GigaScience for a special journal issue in GigaByte Journal focused on publishing new datasets that present biodiversity data for research on vectors of human diseases.
Deadline: 6 June 2025
More info: https://gbif.link/Vector-Paper-Call
#ReleaseWednesday — I just released a new version (v8.0.0) of https://thi.ng/vectors, an almost complete rewrite of the package with all of its ~900 vector operations. I've updated the Readme with a section of _potentially_ minor breaking changes, however I expect this to be a seamless upgrade for the vast majority of users...
I've recently written more about the reasons and implications of this update and I'll refer you to those posts instead of repeating them once more (see links below).
Just the top-level changes:
- Replaced dynamic code generation with higher-order templating to be usable with strict content security policies (when deployed online)
- New structure allows for vast majority of functions to have doc strings (and they do now)
- More consistent/less confusing naming for some operations
- Potentially improved tree-shaking and smaller project bundle sizes
Related to this update I've also refactored and fixed some bugs in other packages (e.g. color, geom, matrices). As a result both the color & matrix packages are now also free from dynamic codegen and therefore won't cause any problems with strict CSPs
Should you run into any issues regarding this update, please get in touch (also grateful for any other experience/impact reports... )
More info in these recent posts/threads:
- https://mastodon.thi.ng/@toxi/114296442006935718
- https://mastodon.thi.ng/@toxi/114319651778770391
- https://mastodon.thi.ng/@toxi/114336012068839250
Happy coding!
To put the "large" package size a little more into perspective: I don't know of any other feature-comparable JS vector library which provides all of the following:
- Generic n-dimensional float, int, uint, boolean vectors
- Size optimized versions for 2D/3D/4D (all types)
- Multiple-dispatch wrappers (auto-delegating to available optimized versions)
- Memory-mapped vectors and optimized versions for various memory layouts (e.g. SOA/AOS)
- Optimized versions of many vector-scalar ops
- Optimized compound operations (like multiply-add etc.)
- Vector randomizations (several approaches)
- 99% of GLSL vector operations & conversions
- Vector versions of most of JS `Math` ops
- Vector interpolations (linear, bilinear, cubic, quadratic...)
- 10 different distance functions & metrics
- Swizzling & vector coercion/extension
- Dozens of additional graphics, statistics & ML-related operations
Just a quick #ThingUmbrella update to say that I've already replaced the https://thi.ng/vectors package on the develop branch and after LOTS of deep experimentation have decided NOT to split up the package. There will be a few (minor) breaking changes, mainly because of enforcing more consistent naming and more granularity in some source files (therefore possibly changed imports, though only if you use direct ones for individual functions...). All in all, I've managed to keep the impact on users to a bare minimum (likely unnoticeable for most), even though it's pretty much a complete rewrite of the entire package (with all its ~900 functions)... This package is now almost 10 years old and I'm very happy how this refactor turned out!
In terms of file size impact: The FULL minified pkg bundle is now 56.4KB vs previously 48.5KB, however the code density has improved and the brotli-compressed pkg size is only 15.1KB (only 1KB larger than before), which I found absolutely incredible! I also have to state once more that this package (and most others in #ThingUmbrella) are _designed for tree shaking_ and bundling. Hardly any project would ever use the full set of functions provided here all at once, most will only use a small/tiny subset...
Also — more importantly — many of the 185 example projects in the repo are now showing between 2-25% smaller final bundle sizes. Some also have become slightly larger, but so far I found the most by only ~2%...
Related to this change: I've also updated the https://thi.ng/color & https://thi.ng/matrices packages to be free from dynamic code generation now! The only packages still using `new Function(...)` are the following, but for those it's unavoidable and dynamic code generation is a core feature:
- https://thi.ng/pixel (custom pixel format definition/compilation)
- https://thi.ng/pixel-convolve (custom image convolution kernel compilation)
- https://thi.ng/shader-ast-js (Shader AST to JavaScript compilation)
I will do more testing over the coming days, then release new version(s) ASAP...
In recent years every spring seems to turn into a period of _massive_ refactoring & restructuring in #ThingUmbrella — maybe it's a form of spring cleaning, even though the reasons[1] are not seasonal... Currently spending my nights reworking the https://thi.ng/vectors package (likely one of the most comprehensive vector packages available for TS/JS) and trying out different splits/structures, testing their impact on package sizes and usability in existing downstream packages. Currently over 3000 source files with uncommitted changes... aaaarrrgghh!
Most functions (vector operations) in this package exist in multiple versions (many code generated, but now in need to be updated): Generic n-dimensional, loop-free, optimized 2D/3D/4D versions and strided versions for manipulating vectors views of larger nD data buffers (supporting all kinds of data layouts, incl. AOS, SOA, hybrid...)
#TDR GBIF and @GigaScience have extended their third call data papers on #vectors of human disease for inclusion in a thematic series published in #GigaByteJournal!
The new deadline is 6 June 2025
Join the team for a #webinar to learn how to submit your work to the series, learn from previous examples of published work and get tips for submitting vector data to GBIF.
22 April 2025 17:00 - 18:00
Webinar: https://ow.ly/AEFN50VutFC
The third call for data papers describing datasets on #vectors of #humandiseases is closing 4 April
GBIF has collaborated with TDR and @GigaScience for a special journal issue in
@GigaByte focused on publishing new datasets that present biodiversity data for research on vectors of human diseases.
More info: https://ow.ly/kUFC50UxNUk
@WHO
Call for data papers!
GBIF has collaborated with TDR and GigaByte Press for a special journal issue focused on publishing new datasets that present biodiversity data for research on #vectors of #humandiseases.
Deadline 4 April 2025
The #span of a set of k #vectors is the collection of all their linear combinations.
In other words, the span of 𝑣1,𝑣2,…,𝑣k consists of all the vectors b for which the equation [𝑣1𝑣2…𝑣k]x=b is consistent.
Beware: The dimension of a vector space is not necessarily the number of elements in a vector. 𝕍 = span( [1 0.5] ) is one-dimensional.
A set of vectors is linearly independent if and only if the vectors form a matrix that has a pivot in every column.
Data returned by an observation typically is represented as a vector in machine learning.
A neural network can be seen as a large collection of linear models. We may represent the inputs and outputs of each layer as vectors, matrices, and tensors (which are like higher dimensional matrices).
In 2016, the American Statistical Association #ASA made a formal statement that "a p-value, or statistical significance, does not measure the size of an effect or the importance of a result".
It also stated that "p-values do not measure the probability that the studied hypothesis is true, or the probability that the data were produced by random chance alone".
We measured consensus by
1 representing abstracts as #vectors using the contextual semantic embedding method, and
2 calculating the cosine similarity between the two vectors.
Consensus is higher for topics with more coauthors.
Also citation counts of scholars and the #small-world property of #networks are positively associated with consensus.
Star researchers and #knowledge brokers bridging different intellectual communities are key to sharing research interests and language.
Hello Mastodon. I'm Alex, a #Scottish ex-pat living in #Texas. I'm a software developer by trade and do #gamedev for fun.
I also love #retro technology and have a little collection of #8-bit computers that I enjoy hanging out with of an evening.
If you like old vector-style video games or fancy new virtual-reality video games or both you might like to try my game VekWars.
#PC: https://washingup.itch.io/vekwars
#MetaQuest: https://www.oculus.com/experiences/quest/3955718291162167/