HHullspring
AI coding workspace

Integer convex hulls

Hullspring supports code changes through a project folder, an AI conversation and a compatible model connection on Windows. Review the turn test in a convex-hull routine and use small point sets to check which collinear vertices remain.

● ● ●Hullspring●
A concrete starting point · Integer convex hulls ×
def convex_hull(points):
    if type(points) is not list or len(points) > 1000:
        raise ValueError("hull.input")
    if any(type(p) not in (tuple, list) or len(p) != 2 or
           any(type(v) is not int for v in p) for p in points):
        raise ValueError("hull.point")
    ordered = sorted(set(map(tuple, points)))
    if len(ordered) <= 1:
        return ordered
    def turn(a,b,c):
        return (b[0]-a[0])*(c[1]-a[1])-(b[1]-a[1])*(c[0]-a[0])
    def chain(sequence):
        out = []
        for p in sequence:
            while len(out) >= 2 and turn(out[-2],out[-1],p) <= 0:
                out.pop()
            out.append(p)
        return out
    return chain(ordered)[:-1]+chain(reversed(ordered))[:-1]
✳Integer convex hulls
✓ ChangesReview before applying ↗
Illustrative workspace
Project
Check empty input, duplicates and collinear points, retaining only extreme endpoints and rejecting fractional coordinates.
Review before applying
Compare actual behavior with the expected result. If a check fails, investigate it before applying more changes.
Connection
Base URL, credentials and a reachable server.
Workflows

Integer convex hulls

Workflows ↗
A concrete starting point
def convex_hull(points):
    if type(points) is not list or len(points) > 1000:
        raise ValueError("hull.input")
    if any(type(p) not in (tuple, list) or len(p) != 2 or
           any(type(v) is not int for v in p) for p in points):
        raise ValueError("hull.point")
    ordered = sorted(set(map(tuple, points)))
    if len(ordered) <= 1:
        return ordered
    def turn(a,b,c):
        return (b[0]-a[0])*(c[1]-a[1])-(b[1]-a[1])*(c[0]-a[0])
    def chain(sequence):
        out = []
        for p in sequence:
            while len(out) >= 2 and turn(out[-2],out[-1],p) <= 0:
                out.pop()
            out.append(p)
        return out
    return chain(ordered)[:-1]+chain(reversed(ordered))[:-1]
AI coding workspace

Connect geometry changes to the application that uses them

Geometry code becomes easier to review when the required output is stated in application terms. Hullspring is a Windows AI coding workspace for working through that requirement with your project open. Ask the connected model to inspect the relevant calculation and its consumers before suggesting edits, so the proposal answers an actual behavior rather than only rearranging a formula.

For example, a selection tool might use an outer boundary around a set of points. Request a review of how duplicate and collinear points affect that boundary, and explain whether intermediate edge points belong in the result. Include the rendering caller and representative fixtures. This gives the assistant a concrete task without assuming any selection tool is bundled with Hullspring.

Review a proposed patch for output order, input validation and the empty case as well as the typical shape. Run your project with a line of points, repeated coordinates and a small polygon. Compare the returned sequence with the consumer’s expectations; the right geometric set can still produce the wrong display when ordering or closure conventions differ.

Hullspring supports model connections through OpenAI-compatible or Anthropic endpoints. An abliterated AI model may be selected where available, but its service determines restrictions, context capacity and tools. Use the conversation to clarify your implementation choices and keep verification anchored in the project’s own fixtures.

Preparing a geometry maintenance request

Should collinear edge points stay in the boundary?

State the requirement for your consumer. Some uses need only extreme vertices, while others preserve intermediate points. Ask the model to inspect the current convention and make any policy change explicit in both the proposal and tests.

Why include the rendering code in a calculation review?

It may expect a particular traversal order or a repeated closing vertex. A calculation can return the intended points yet violate that interface. Inspecting the consumer helps prevent a local correction from creating a visible regression.

What fixtures help expose assumptions quickly?

Use an empty set, one point, duplicates, a straight line and a small polygon with an interior point. Write the expected output convention for each. Run them in your project rather than relying on a drawn shape alone.

Can a patch broaden accepted coordinate types incidentally?

Treat that as a separate contract change. Different numeric representations may affect comparisons and validation. Ask why the extension is needed and check callers before accepting it as part of an otherwise focused geometry correction.

Get the Windows app ↗

Hullspring · Updated 2026-10-25