func Make(app bigbase.RenderApplication) BigSequenceNumerics {
	w, h := app.PictureDimensions()
	return BigSequenceNumerics{
		BigBaseNumerics: bigbase.Make(app),
		area:            int(w * h),
	}
}
Beispiel #2
0
func Make(app RenderApplication) BigRegionNumerics {
	sequence := bigsequence.Make(app)
	parent := bigbase.Make(app)
	planeMin := bigbase.BigComplex{parent.RealMin, parent.ImagMin}
	planeMax := bigbase.BigComplex{parent.RealMax, parent.ImagMax}
	reg := BigRegionNumerics{
		BigBaseNumerics:  parent,
		RegionConfig:     app.RegionConfig(),
		SequenceNumerics: &sequence,
		Region:           createBigRegion(parent, planeMin, planeMax),
	}
	return reg
}
Beispiel #3
0
func (z *Zoom) lens(degree float64) *Info {
	appinfo := new(Info)
	*appinfo = z.Prev
	appinfo.UserRequest.FixAspect = config.Stretch
	baseapp := makeBaseFacade(appinfo)
	app := makeBigBaseFacade(appinfo, baseapp)
	num := bigbase.Make(app)

	time := bigbase.MakeBigFloat(degree, num.Precision)

	// Y min and max reversed as pixels grow downward...
	min := num.PixelToPlane(int(z.Xmin), int(z.Ymax))
	max := num.PixelToPlane(int(z.Xmax), int(z.Ymin))

	target := []big.Float{
		min.R,
		min.I,
		max.R,
		max.I,
	}

	bounds := []big.Float{
		z.Prev.RealMin,
		z.Prev.ImagMin,
		z.Prev.RealMax,
		z.Prev.ImagMax,
	}

	zoom := make([]*big.Float, len(bounds))
	for i, b := range bounds {
		d := distort{
			prev: b,
			next: target[i],
		}

		res := d.para(&time)
		zoom[i] = res
	}

	info := new(Info)
	*info = z.Prev
	info.RealMin = *zoom[0]
	info.ImagMin = *zoom[1]
	info.RealMax = *zoom[2]
	info.ImagMax = *zoom[3]
	info.UserRequest = info.GenRequest()

	return info
}