Skip to content

Instantly share code, notes, and snippets.

💙
Coding Go

Peter Hellberg peterhellberg

💙
Coding Go
Block or report user

Report or block peterhellberg

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View s3270.go
package s3270
import (
"fmt"
"log"
"os/exec"
"strings"
"time"
)
@peterhellberg
peterhellberg / gfx-noise-loops.go
Last active Mar 14, 2019
(Simplex) Noise loops using gfx
View gfx-noise-loops.go
package main
import "github.com/peterhellberg/gfx"
const (
seed = 123
scale = 256
radius = 420
count = 64
)
@peterhellberg
peterhellberg / gfx-sdf-pie.go
Created Feb 27, 2019
Circle with IsoscelesTriangle subtracted from it using gfx.
View gfx-sdf-pie.go
package main
import "github.com/peterhellberg/gfx"
func main() {
var (
size = float64(192)
center = gfx.V(-256, -256)
matrix = gfx.IM.Moved(center).RotatedDegrees(gfx.ZV, 270)
c = gfx.PaletteEN4.Color
@peterhellberg
peterhellberg / ebiten-gfx-raycaster.go
Last active Aug 5, 2019
Raycaster rendered by Ebiten using gfx.
View ebiten-gfx-raycaster.go
package main
import (
"bytes"
"flag"
"image"
"image/color"
"math"
"time"
@peterhellberg
peterhellberg / gfx-geo-tile-server.go
Last active Feb 16, 2019
Caching Geo Tile Server using graceful, httpcache and gfx.
View gfx-geo-tile-server.go
package main
import (
"flag"
"io/ioutil"
"net/http"
"net/url"
"os"
"strconv"
View gfx-geo-tiles-carto-basemaps-animated.go
package main
import "github.com/peterhellberg/gfx"
const (
zoomLevels = 18
tileSize = 512
tileFormat = "https://a.basemaps.cartocdn.com/rastertiles/voyager/%d/%d/%d@2x.png"
)
View gfx-geo-tiles-stamen-watercolor.go
package main
import "github.com/peterhellberg/gfx"
const (
zoomLevels = 19
tileSize = 256
tileFormat = "http://a.tile.stamen.com/watercolor/%d/%d/%d.jpg"
)
@peterhellberg
peterhellberg / gfx-geo-countries.go
Last active Feb 15, 2019
GeoPoint rendering using gfx.
View gfx-geo-countries.go
package main
import (
"image/draw"
"io"
"strconv"
"text/scanner"
"github.com/peterhellberg/gfx"
)
@peterhellberg
peterhellberg / gfx-sweden.go
Created Feb 15, 2019
sweden.poly rendered using gfx.
View gfx-sweden.go
package main
import (
"io"
"net/http"
"strconv"
"text/scanner"
"github.com/peterhellberg/gfx"
)
@peterhellberg
peterhellberg / gfx-simplex-blocks.go
Created Feb 14, 2019
Simplex noise blocks using gfx.
View gfx-simplex-blocks.go
package main
import "github.com/peterhellberg/gfx"
func main() {
var (
blocks gfx.Blocks
origin = gfx.V3(640, -1280*2, 9)
sn = gfx.NewSimplexNoise(17)
dst = gfx.NewImage(1280, 1280)
You can’t perform that action at this time.