Jonkman Microblog
  • Login
Show Navigation
  • Public

    • Public
    • Network
    • Groups
    • Popular
    • People

Conversation

Notices

  1. Don Romano 🍹 (thj@mastodon.cloud)'s status on Wednesday, 11-Sep-2019 15:57:31 EDT Don Romano 🍹 Don Romano 🍹

    const v = new Array(8);
    for(let i = 0; i < v.length; i++) {
    v[i] = [
    Math.pow(-1, i),
    Math.pow(-1, Math.floor(i/2)),
    Math.pow(-1, Math.floor(i/4))
    ];
    }

    Here is a piece of code I wrote that generates the coordinates for the 8 vertices of a (±1, ±1,±1) cube.

    Can you tell how it works?

    In conversation Wednesday, 11-Sep-2019 15:57:31 EDT from mastodon.cloud permalink
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

Jonkman Microblog is a social network, courtesy of SOBAC Microcomputer Services. It runs on GNU social, version 1.2.0-beta5, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All Jonkman Microblog content and data are available under the Creative Commons Attribution 3.0 license.

Switch to desktop site layout.