gap&gt; pg1 := PG(1, 7);
ProjectiveSpace(1, 7)
gap&gt; pg3 := PG(3, 7);
ProjectiveSpace(3, 7)
gap&gt; points := Points(pg1);
&lt;points of ProjectiveSpace(1, 7)&gt;
gap&gt; coords := List(points, Coordinates);
[ [ Z(7)^0, 0*Z(7) ], [ Z(7)^0, Z(7)^0 ], [ Z(7)^0, Z(7) ], 
  [ Z(7)^0, Z(7)^2 ], [ Z(7)^0, Z(7)^3 ], [ Z(7)^0, Z(7)^4 ], 
  [ Z(7)^0, Z(7)^5 ], [ 0*Z(7), Z(7)^0 ] ]
gap&gt; curve := List(coords, t -&gt; VectorSpaceToElement(pg3, [ t[1]^3, t[1]^2 * t[2], t[1] * t[2]^2, t[2]^3  ] ));;
gap&gt; pgl := ProjectivityGroup( pg3 );
The FinInG projectivity group PGL(4,7)
gap&gt; stabcurve := FiningSetwiseStabiliser( pgl, curve );
#I  Computing adjusted stabilizer chain...
&lt;projective collineation group with 6 generators&gt;
gap&gt; StructureDescription( stabcurve );
"PSL(3,2) : C2"
gap&gt; Span( curve );
ProjectiveSpace(3, 7)
gap&gt; pg3lines := Lines( pg3 );
&lt;lines of ProjectiveSpace(3, 7)&gt;
gap&gt; orbits := FiningOrbits(stabcurve, pg3lines);
2%..3%..9%..15%..16%..21%..22%..28%..34%..40%..46%..52%..64%..75%..81%..84%..88%..94%..95%..99%..100%..[ &lt;closed orbit, 8 points&gt;, &lt;closed orbit, 56 points&gt;, 
  &lt;closed orbit, 28 points&gt;, &lt;closed orbit, 168 points&gt;, 
  &lt;closed orbit, 168 points&gt;, &lt;closed orbit, 28 points&gt;, 
  &lt;closed orbit, 168 points&gt;, &lt;closed orbit, 28 points&gt;, 
  &lt;closed orbit, 168 points&gt;, &lt;closed orbit, 168 points&gt;, 
  &lt;closed orbit, 168 points&gt;, &lt;closed orbit, 168 points&gt;, 
  &lt;closed orbit, 168 points&gt;, &lt;closed orbit, 336 points&gt;, 
  &lt;closed orbit, 336 points&gt;, &lt;closed orbit, 168 points&gt;, 
  &lt;closed orbit, 84 points&gt;, &lt;closed orbit, 112 points&gt;, 
  &lt;closed orbit, 168 points&gt;, &lt;closed orbit, 21 points&gt;, 
  &lt;closed orbit, 112 points&gt;, &lt;closed orbit, 21 points&gt; ]
gap&gt; List(orbits, Size);
[ 8, 56, 28, 168, 168, 28, 168, 28, 168, 168, 168, 168, 168, 336, 336, 168, 
  84, 112, 168, 21, 112, 21 ]
gap&gt; pg3points := Points( pg3 );
&lt;points of ProjectiveSpace(3, 7)&gt;
gap&gt; orbits := FiningOrbits(stabcurve, pg3points);
2%..16%..30%..72%..100%..[ &lt;closed orbit, 8 points&gt;, &lt;closed orbit, 56 points&gt;, 
  &lt;closed orbit, 56 points&gt;, &lt;closed orbit, 168 points&gt;, 
  &lt;closed orbit, 112 points&gt; ]
gap&gt; List(orbits, Size);
[ 8, 56, 56, 168, 112 ]
gap&gt; reps := List(orbits, Representative);
[ &lt;a point in ProjectiveSpace(3, 7)&gt;, &lt;a point in ProjectiveSpace(3, 7)&gt;, 
  &lt;a point in ProjectiveSpace(3, 7)&gt;, &lt;a point in ProjectiveSpace(3, 7)&gt;, 
  &lt;a point in ProjectiveSpace(3, 7)&gt; ]
gap&gt; x := reps[2];
&lt;a point in ProjectiveSpace(3, 7)&gt;
gap&gt; proj := NaturalProjectionBySubspace(pg3, x);
&lt;geometry morphism from &lt;All elements of ProjectiveSpace(3, 
7)&gt; to &lt;All elements of ProjectiveSpace(2, 7)&gt;&gt;
gap&gt; curveminusx := Difference(curve, [x]);
[ &lt;a point in ProjectiveSpace(3, 7)&gt;, &lt;a point in ProjectiveSpace(3, 7)&gt;, 
  &lt;a point in ProjectiveSpace(3, 7)&gt;, &lt;a point in ProjectiveSpace(3, 7)&gt;, 
  &lt;a point in ProjectiveSpace(3, 7)&gt;, &lt;a point in ProjectiveSpace(3, 7)&gt;, 
  &lt;a point in ProjectiveSpace(3, 7)&gt;, &lt;a point in ProjectiveSpace(3, 7)&gt; ]
gap&gt; cuspidal := ImagesSet(proj, List(curveminusx, t -&gt; Span(x, t)));
[ &lt;a point in ProjectiveSpace(2, 7)&gt;, &lt;a point in ProjectiveSpace(2, 7)&gt;, 
  &lt;a point in ProjectiveSpace(2, 7)&gt;, &lt;a point in ProjectiveSpace(2, 7)&gt;, 
  &lt;a point in ProjectiveSpace(2, 7)&gt;, &lt;a point in ProjectiveSpace(2, 7)&gt;, 
  &lt;a point in ProjectiveSpace(2, 7)&gt;, &lt;a point in ProjectiveSpace(2, 7)&gt; ]
gap&gt; coords := List(cuspidal, Coordinates);
[ [ Z(7)^0, 0*Z(7), 0*Z(7) ], [ 0*Z(7), 0*Z(7), Z(7)^0 ], 
  [ Z(7)^0, Z(7)^0, Z(7)^0 ], [ Z(7)^0, Z(7)^2, Z(7)^0 ], 
  [ Z(7)^0, Z(7)^4, Z(7)^0 ], [ Z(7)^0, Z(7)^0, Z(7)^3 ], 
  [ Z(7)^0, Z(7)^2, Z(7)^3 ], [ Z(7)^0, Z(7)^4, Z(7)^3 ] ]
gap&gt; r := PolynomialRing(GF(7), 3);
GF(7)[x_1,x_2,x_3]
gap&gt; indets := IndeterminatesOfPolynomialRing(r);
[ x_1, x_2, x_3 ]
gap&gt; shapes := Filtered(Tuples([0,1,2,3], 3), t -&gt; Sum(t) = 3);
[ [ 0, 0, 3 ], [ 0, 1, 2 ], [ 0, 2, 1 ], [ 0, 3, 0 ], [ 1, 0, 2 ], 
  [ 1, 1, 1 ], [ 1, 2, 0 ], [ 2, 0, 1 ], [ 2, 1, 0 ], [ 3, 0, 0 ] ]
gap&gt; mat := List(coords, t -&gt; List(shapes, u -&gt; Product([1,2,3], i -&gt; t[i]^u[i])));
[ [ 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 
      Z(7)^0 ], 
  [ Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7), 0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], 
  [ Z(7)^3, Z(7)^0, Z(7)^3, Z(7)^0, Z(7)^0, Z(7)^3, Z(7)^0, Z(7)^3, Z(7)^0, 
      Z(7)^0 ], 
  [ Z(7)^3, Z(7)^2, Z(7), Z(7)^0, Z(7)^0, Z(7)^5, Z(7)^4, Z(7)^3, Z(7)^2, 
      Z(7)^0 ], 
  [ Z(7)^3, Z(7)^4, Z(7)^5, Z(7)^0, Z(7)^0, Z(7), Z(7)^2, Z(7)^3, Z(7)^4, 
      Z(7)^0 ] ]
gap&gt; sol := NullspaceMat(TransposedMat(mat2))[1];
[ 0*Z(7), 0*Z(7), 0*Z(7), Z(7)^3, Z(7)^0, 0*Z(7), 0*Z(7), 0*Z(7), 0*Z(7),
   0*Z(7) ]
gap&gt; terms := List(shapes, u -&gt; Product([1,2,3], i -&gt; indets[i]^u[i]));
[ x_3^3, x_2*x_3^2, x_2^2*x_3, x_2^3, x_1*x_3^2, x_1*x_2*x_3, x_1*x_2^2, 
  x_1^2*x_3, x_1^2*x_2, x_1^3 ]
gap&gt; poly := terms * sol;
x_1*x_3^2-x_2^3
gap&gt; pg2 := AmbientGeometry(Range(proj));
ProjectiveSpace(2, 7)
gap&gt; variety := ProjectiveVariety(pg2, [poly]);
Projective Variety in ProjectiveSpace(2, 7)
gap&gt; points := Points(variety);
&lt;points of Projective Variety in ProjectiveSpace(2, 7)&gt;
gap&gt; Size(points);
8
