<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def plane(strike, dip, segments=100, center=(0, 0)):
 """ Calculates the longitude and latitude of `segments` points along the stereonet projection of each plane with a given `strike` and `dip` in degrees. Returns points for one hemisphere only. Parameters strike : number or sequence of numbers The strike of the plane(s) in degrees, with dip direction indicated by the azimuth (e.g. 315 vs. 135) specified following the "right hand rule". dip : number or sequence of numbers The dip of the plane(s) in degrees. segments : number or sequence of numbers The number of points in the returned `lon` and `lat` arrays. Defaults to 100 segments. center : sequence of two numbers (lon, lat) The longitude and latitude of the center of the hemisphere that the returned points will be in. Defaults to 0,0 (approriate for a typical stereonet). Returns ------- lon, lat : arrays `num_segments` x `num_strikes` arrays of longitude and latitude in radians. """

    lon0, lat0 = center
    strikes, dips = np.atleast_1d(strike, dip)
    lons = np.zeros((segments, strikes.size), dtype=np.float)
    lats = lons.copy()
    for i, (strike, dip) in enumerate(zip(strikes, dips)):
        # We just plot a line of constant longitude and rotate it by the strike.
        dip = 90 - dip
        lon = dip * np.ones(segments)
        lat = np.linspace(-90, 90, segments)
        lon, lat = _rotate(lon, lat, strike)

        if lat0 != 0 or lon0 != 0:
            dist = angular_distance([lon, lat], [lon0, lat0], False)
            mask = dist > (np.pi / 2)
            lon[mask], lat[mask] = antipode(lon[mask], lat[mask])
            change = np.diff(mask.astype(int))
            ind = np.flatnonzero(change) + 1
            lat = np.hstack(np.split(lat, ind)[::-1])
            lon = np.hstack(np.split(lon, ind)[::-1])

        lons[:,i] = lon
        lats[:,i] = lat

    return lons, lats