Skip to content

Instantly share code, notes, and snippets.

View arnholm's full-sized avatar

Carsten Arnholm arnholm

View GitHub Profile

This is the manyballs performance test using 5x5x5 balls

AngelCAD

13697 > "as_csg"  "manyballs_angelcad.as" -outsub="xcsg" -include="~/.angelcad/libraries" 
as_csg started.

Created XCSG file: xcsg/manyballs_angelcad.xcsg
as_csg v1.3-00 finished, time used: 0d 00h 00m 00.012s
@arnholm
arnholm / aclib_sign_generator.md
Last active April 30, 2019 22:03
Demonstration of text fonts in AngelCAD library 'aclib'
// AngelCAD code: aclib_sign_generator.as
// 
// This sample requires the https://github.com/arnholm/aclib 
// library to be installed in the AngelCAD libraries folder.

// select the font to use from one of the available
#include "aclib/fonts/LiberationSerif_Bold.as"

shape@ main_shape()

We use AngelCAD to generate OpenSCAD input :-)

Generate a polygon witn N sides, from an array of positions

// AngelCAD code: openscad_polygon.as
shape@ main_shape()
{
   // build an array from np points
 array p;
@arnholm
arnholm / csg_wikipedia.md
Last active August 16, 2019 13:36
csg_wikipedia - Constructive Solid Geometry
// AngelCAD code sample: csg_wikipedia.as
// https://en.wikipedia.org/wiki/Constructive_solid_geometry
// https://arnholm.github.io/angelcad-docs/

shape@ main_shape()
{
   // intersection of cube and sphere
   cube@       cu = cube(size:45,center:true);
 sphere@ sp = sphere(r:30);
@arnholm
arnholm / megaliths.md
Last active March 2, 2020 14:22
A collection of links with possible evidence of ancient technology world wide

Introduction

This page serves as a scratchpad for links to web pages and videos documenting megaliths (mega=big lith=stone). I became interested in the topic of ancient high technology early in 2018 and started to collect links.

I would initially not have believed that there are so many locations all over the world showing structures with very high precision and extremely heavy stones, but the list is just growing day by day. This page attempts to document some of this by linking to the pages and videos available on the topic.

Before starting the "journey", it is worth mentioning some of the top sources of information (although there are many others). First, the YouTube channel of Brien Foerster is worth mentioning. Brien Foerster lives in Peru and introduced me (via his videos) to the many fantastic sites in Peru and Bolivia. A natural starting point below will therefore be Peru and Bolivia. The second source of information is the YouTube channel of [An

// AngelCAD code, showing use of function pointer

funcdef double CALLBACK(int i);

solid@ object(CALLBACK@ f,int i) 
{ 
   return sphere(f(i)); 
}
@arnholm
arnholm / wishlist.md
Last active September 29, 2019 07:52
  1. Mutable variables. Variables are mutable in AngelCAD, since it is using the AngelScript language. One is not restricted to lists and recursion, but those are also available.

  2. Better data structures. Classes would be beautiful. User defined classes are supported in AngelCAD, also with inheritance. Also a dictionary an a map similar to C++ map.

2b. data structure for polyhedron vertices-and-faces. https://arnholm.github.io/angelcad-docs/docs/classpolyhedron.html

  1. passing functions as a first class object. In AngelCAD one can define function pointers and pass them as arguments https://gist.github.com/arnholm/7061458777913e5795585eee46fcb664 . Obviously, you can also pass handles to instances of user defined classes.

  2. Ability to rename built-in and existing modules/functions. There is namespace support in AngelScript, but adnittedly I have not explored it in much detail